What is a database index?

A database index is a data structure that lets a database find rows quickly without scanning an entire table, much like a book's index points to pages. Indexes dramatically speed up lookups, filters and joins on the indexed columns, at the cost of extra storage and slightly slower writes.

Without an index, finding matching rows means a full table scan, reading every row. An index keeps a sorted, searchable structure (commonly a B-tree) on one or more columns, so the database can jump straight to the rows it needs.

Indexes help with:

  • Lookups finding a specific customer by id.
  • Range filters orders between two dates.
  • Joins matching keys between tables efficiently.
  • Sorting and grouping on indexed columns.

The trade-offs are extra storage and a small write cost, since every insert or update must also maintain the index. Choosing the right indexes is a core part of database performance tuning.

iDBQuery benefits from whatever indexes your database already has, because it queries your source in place: the SQL it generates runs against your live database and uses your existing indexes for speed. iDBQuery does not require you to build special reporting structures to ask a question, it writes efficient SQL, runs it against your indexed source, and returns a cited answer. For very large results it also manages sampling and result handling so answers stay fast.

Updated 2026-06-22