postgresql_16:3.8.2 Index Types
PostgreSQL 16 > The SQL Language > Indexes > Index Types
PostgreSQL provides several index types: B-tree, Hash, GiST, SP-GiST, GIN, BRIN, and the extension bloom (see postgresql_16:9.6.7). Each index type uses a different algorithm that is best suited to different types of indexable clauses. By default, the CREATE INDEX (see postgresql_16:7.1.67) command creates B-tree indexes, which fit the most common situations. The other index types are selected by writing the keyword USING followed by the index type name. For example, to create a Hash index: CREATE INDEX *name* ON *table* USING HASH (*column*);
Subsections
- postgresql_16:3.8.2.1 B-Tree
- postgresql_16:3.8.2.2 Hash
- postgresql_16:3.8.2.3 GiST
- postgresql_16:3.8.2.4 SP-GiST
- postgresql_16:3.8.2.5 GIN
- postgresql_16:3.8.2.6 BRIN