jjacobi
jjacobi

Reputation: 405

Does the include order has any impact on covering indexes?

Is there any difference between the two following indexes in PostgreSQL:

CREATE INDEX my_index ON table_name (column_one, column_two)
   INCLUDE (account_id, id)

and

CREATE INDEX my_index ON table_name (column_one, column_two)
   INCLUDE (id, account_id)

Upvotes: 2

Views: 89

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 247800

No, there is no difference in behavior between these two indexes. The order in the INCLUDE list does not matter.

Upvotes: 2

Related Questions