liveBook · Manning

Database index

A database index is an auxiliary data structure that organizes keys or references to records to support efficient lookup and retrieval.

How 3 Manning books explain it

Microservices Patterns, Second Edition

A database structure that supports efficient retrieval of rows or records based on selected fields or expressions.

How it is used
Uses indexes to balance query performance and event-handler updates when designing service databases and CQRS views.
How deep it goes
Discusses index selection and maintenance trade-offs without detailing index internals.
Examples
Uses an indexed ticket ID to locate an order record when a ticket event requires an update.
What you can do after
Evaluate index choices against query efficiency, write overhead, and view-maintenance needs.

Read how Microservices Patterns, Second Edition explains database index →

Grokking Software Architecture

An auxiliary database data structure that accelerates retrieval by organizing references to rows according to selected values.

How it is used
Speeds database lookups by organizing selected values for direct access to matching rows.
How deep it goes
Defines B-tree lookup behavior and read-write tradeoffs, then cautions against indexing every column.
Examples
Uses a Bob email search, a phone-book analogy, and filing papers in multiple folders.
What you can do after
Evaluate index choices by weighing lookup speed against write cost and avoiding low-cardinality or massive-text columns.

Read how Grokking Software Architecture explains database index →

Designing AI Systems

A database index is a persisted auxiliary structure that accelerates retrieval of rows matching query conditions.

How it is used
Accelerates session retrieval, document lifecycle operations, and vector search in PostgreSQL.
How deep it goes
Explains lookup benefits, index choices, and production creation tradeoffs, and contrasts IVFFlat with brute-force vector search.
Examples
Uses session and message lookup indexes, plus document, metadata, and embedding indexes in a pgvector schema.
What you can do after
Operate/configure PostgreSQL indexes for lookup columns and vector search while accounting for table size and write availability.

Read how Designing AI Systems explains database index →

Also covered in

What to know first

Related concepts

Questions about database index

What is database index?

A database index is an auxiliary data structure that organizes keys or references to records to support efficient lookup and retrieval.

Which Manning books explain database index?

Microservices Patterns, Second Edition, Grokking Software Architecture and Designing AI Systems.

What should I know before learning database index?

Manning books that teach database index usually introduce NoSQL database, CPU, eventual consistency and foreign key first.

What is the difference between database index and bulk write?

A database index is an auxiliary data structure that organizes keys or references to records to support efficient lookup and retrieval. Bulk write is a data operation that inserts or modifies many records as a grouped workload rather than through separate individual writes.

What is database index part of?

Database index is part of object store. An object store is a storage system that persists and retrieves discrete data objects by identifiers or keys, often with associated metadata.

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.