Partial index
A partial index is a database index containing entries only for records that satisfy a specified predicate.
Just Use Postgres!
A partial index is a database index that contains entries only for table rows satisfying a specified condition.
- How it is used
- Optimizes queries that repeatedly target a small, condition-defined subset of table rows.
- How deep it goes
- Explains predicates, storage and update benefits, and EXPLAIN behavior through SQL examples without covering index internals.
- Examples
- Demonstrates occasional-player tracking, active message queues, and named geospatial points with non-null names.
- What you can do after
- Operate/configure PostgreSQL partial indexes and diagnose their use with EXPLAIN execution plans.
MongoDB 8.0 in Action, Third Edition
A partial index indexes only documents that satisfy a specified filter expression.
- How it is used
- Improves indexing efficiency when only documents meeting a defined condition need indexed access.
- How deep it goes
- Defines filtered indexing, explains supported operators and cost benefits, and demonstrates one compound example without deeper planner analysis.
- Examples
- Uses a movies collection index on year, type, and imdb.rating filtered to documents where type equals "movie".
- What you can do after
- Apply it via db.collection.createIndex() with indexed fields and a partialFilterExpression.
Read how MongoDB 8.0 in Action, Third Edition explains partial index →
Also covered in
Related concepts
- indexingkind of · Indexing is the process of assigning or using positions, keys, or lookup structures to identify and access elements or records.
- createIndex()configured by · An API operation that creates an index on a data collection or object store to support lookup by specified keys.
- where clauseconfigured by · A WHERE clause is a query-language clause that restricts returned or affected rows or records according to a specified condition.
- SQLused by · SQL is a standardized declarative language for defining, querying, and manipulating data in relational database systems.
Questions about partial index
What is partial index?
A partial index is a database index containing entries only for records that satisfy a specified predicate.
Which Manning books explain partial index?
Just Use Postgres! and MongoDB 8.0 in Action, Third Edition.
What is the difference between partial index and sparse index?
A partial index is a database index containing entries only for records that satisfy a specified predicate. A sparse index is an index that contains entries only for documents having the indexed field, including entries whose field value is null.
What is partial index a kind of?
Partial index is a kind of indexing. Indexing is the process of assigning or using positions, keys, or lookup structures to identify and access elements or records.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

