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.
SubscribeRelated
CREATE INDEXUNIQUE indexindex-only scanscovering indexespartitioningindexes on expressions