Does the include order has any impact on covering indexes?

74 views Asked by At

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)
1

There are 1 answers

0
Laurenz Albe On BEST ANSWER

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