RefLib

Reference library for AI

Back

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

Back