Data structures that accelerate queries by providing fast lookup paths into tables, optimizing read access.
Database indexes are data structures that accelerate retrieval operations by providing fast lookup paths for rows based on key values. They reduce query latency and improve read performance but add storage and maintenance overhead during writes. Proper index selection and monitoring balance speed, cost and consistency in production systems.
Average latency for queries that use indexed columns.
Share of queries that actually use existing indexes.
Additional time/CPU per write operation caused by index maintenance.
Default index for ordered lookups and range queries in many RDBMS.
Efficient for equality comparisons but unsuitable for range queries.
Partial indexes or GIN indexes enable performant queries on semi-structured data.
Profile existing queries and identify hotspots.
Choose appropriate index type (B-Tree, Hash, GIN, etc.).
Implement in staging, validate via realistic load tests, gradual rollout and monitoring.