Skip to content
masterclass Buddy

PostgreSQL · Concept

Partial index

A partial index contains entries for only the table rows that satisfy a WHERE predicate. It can reduce index size and speed up access to a small, useful subset of rows.

Last updated

Syntax

CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] name ] ON [ ONLY ] table_name [ USING method ] ( { column_name | ( expression ) } [, ...] ) [ WHERE predicate ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • CREATE INDEX
  • UNIQUE index
  • index-only scans
  • covering indexes
  • partitioning
  • indexes on expressions

Source: PostgreSQL: Documentation: 18: 11.8. Partial Indexes. Checked 2026-11-03.