liveBook · Manning

Composite index

A composite index is a database index whose key contains multiple fields or columns, ordered according to the index definition.

How 3 Manning books explain it

Just Use Postgres!

A composite index is a database index defined over multiple columns, ordering entries first by one column and then by subsequent columns.

How it is used
Optimizes queries that filter or order by related columns, such as regional leaderboards and device-specific time-series ranges.
How deep it goes
Explains column ordering, leading-column behavior, execution plans, and caveats, but defers broader index administration.
Examples
Demonstrates regional player rankings, filtered score queries, and smartwatch measurements filtered by timestamp and device.
What you can do after
Diagnose/debug with it by creating indexes, reading EXPLAIN plans, and checking whether ordering and filters use the intended index.

Read how Just Use Postgres! explains composite index →

MongoDB 8.0 in Action, Third Edition

A compound index is an index whose key consists of multiple document fields.

How it is used
Speeds recurring MongoDB queries that filter on multiple fields or sort on multiple fields.
How deep it goes
Defines index prefixes, works through creation commands and execution plans, and specifies sort-key order without detailing index storage internals.
Examples
Uses movie indexes on release year, type, IMDb rating, and title, plus theater and runtime sorting queries.
What you can do after
Build it from scratch with createIndex, align field order with queries and sorts, and check index use with explain("executionStats").

Read how MongoDB 8.0 in Action, Third Edition explains composite index →

Natural Language Processing in Action, Second Edition

A composite index combines multiple indexing algorithms or stages into a single retrieval structure.

How it is used
Uses staged vector retrieval to reduce memory pressure while supporting large-scale nearest-neighbor search.
How deep it goes
Defines multi-stage indexing and explains memory and configuration tradeoffs, but stops short of implementation procedures or tuning recipes.
Examples
Uses IVFPQ, HNSW plus PQ, NumPy quantization, Faiss, Weaviate, and a New York Times ANN comparison.
What you can do after
Evaluate composite-index tradeoffs and recognize when memory savings justify added configuration complexity.

Read how Natural Language Processing in Action, Second Edition explains composite index →

Related concepts

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.