PostgreSQL Indexes
Browse PostgreSQL index creation, listing, types, multicolumn and expression indexes, partial and unique indexes, reindexing, and removal.
Indexes can make selective lookups faster, at the cost of storage and write work. Use these guides to create and inspect indexes, choose an index type, and maintain indexes:
- Create an index
- List indexes on a table
- Choose an index type
- Build a multicolumn index
- Index an expression
- Create a partial index
- Create a unique index
- Rebuild indexes
- Drop an index
For the matching metadata commands in MySQL, MariaDB, SQL Server, SQLite, and Oracle, see list indexes across SQL databases.
Advertisement
-
PostgreSQL Index Types
This article describes the types of indexes in PostgreSQL and how to use them properly. -
PostgreSQL CREATE INDEX
Create PostgreSQL indexes withCREATE INDEX. Learn unique indexes,IF NOT EXISTSbehavior, and concurrent builds that allow writes. -
PostgreSQL Drop Indexes
This article describes how to drop existing indexes from a table usdingDROP INDEX. -
PostgreSQL show indexes
This article describes how to show indexes of a table in PostgreSQL. -
PostgreSQL Multicolumn Indexes
This article describes how to create multicolumn indexes in PostgreSQL. -
PostgreSQL Unique Indexes
Learn how PostgreSQL unique indexes enforce single-column and composite uniqueness, including NULLS NOT DISTINCT and partial indexes. -
PostgreSQL Expression Indexes
This article describes how to create expression indexes in PostgreSQL. -
PostgreSQL Partial Indexes
This article describes how to create partial indexes in PostgreSQL. -
PostgreSQL REINDEX
This article describes how to rebuild indexes in PostgreSQL.