Postgres Composite Indexes: Column Order, Covering Indexes and Skip Scan, Measured on 5 Million Rows
Why the same two columns can make a query 1,000 times faster or barely help, depending on their order. Measured with EXPLAIN on PostgreSQL 16 and 18, including INCLUDE, partial and expression indexes, the new skip scan, and what every extra index costs on writes.


