Database index
A database index is an auxiliary data structure that organizes keys or references to records to support efficient lookup and retrieval.
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.
Also covered in
- HTML5 in Action
- Fast by DefaultIn early access (MEAP)
- High Performance Unity Game DevelopmentIn early access (MEAP)
- Vanilla WebIn early access (MEAP)
What to know first
- NoSQL databaseA NoSQL database is a database system organized primarily around nonrelational data models rather than the traditional relational table model.
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- eventual consistencyEventual consistency is a distributed-data consistency model in which replicas may temporarily differ but converge to the same state if updates cease and have time to propagate.
- foreign keyA foreign key is a column or set of columns whose values reference a key in the same or another relational table, linking records and supporting referential integrity.
Related concepts
- data-oriented programmingused by · Data-oriented programming is an approach to structuring software around data representations and the operations, access patterns, and transformations applied to them.
- object storepart of · An object store is a storage system that persists and retrieves discrete data objects by identifiers or keys, often with associated metadata.
- AMQ message storeused by · The AMQ message store is an ActiveMQ storage system that organizes persistent messages, indexes, and related broker data in directories and journal files.
- data servicepart of · A data service is a software service that provides other systems or applications with access to data through an interface.
- listused by · A list is an ordered collection of elements arranged in a sequence.
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.


