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 →
Related concepts
- indexingkind of · Indexing is the organization or use of positions, keys, or lookup structures to identify and retrieve selected data or elements.
- createIndex()configured by · createIndex() is a MongoDB database method that creates an index on a collection with specified key and option definitions.
- where clauseconfigured by · A WHERE clause is a query-language clause that restricts returned or affected records to those satisfying a specified predicate.
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.

