FeaturedPostgreSQL Indexes: Which Type to Use (10M-Row Benchmark)
A PostgreSQL index is a separate structure that lets the database find rows without reading the whole table. Which type to use, from B-tree and hash to BRIN, GIN and partial or covering indexes, measured on 10 million rows with PostgreSQL 18.
Key takeawayB-tree is the right default. On a table with 10 million rows it turned a 158 ms sequential scan into a 0.11 ms lookup, about 1,400 times faster, and it handles equality, ranges and sorting with one structure.













