Indexes
-
PostgreSQL indexes are effective tools to enhance database performance.
-
Indexes help the database server find specific rows much faster than it could do without indexes.
-
Indexes add write and storage overheads to the database system. Therefore, using them appropriately is very important.
-
PostgreSQL provides several index types: B-tree, Hash, GiST, SP-GiST, GIN and BRIN.
-
Each index type uses a different algorithm that is best suited to different types of queries.
-
By default, the CREATE INDEX command creates B-tree indexes, which fit the most common situations.