thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Foundational

Database Index

A data structure that speeds up row lookups on one or more columns at the cost of extra storage and slower writes.

Definition

An index works like a book index: it lets the engine find matching rows without scanning the whole table. Every INSERT, UPDATE and DELETE must also maintain the indexes, so too many indexes slow writes. Most relational indexes are B-trees; analytic engines rely more on columnstores, pruning and clustering.

Example

CREATE INDEX IX_Orders_CustomerID ON Orders (CustomerID);

Exam tip

Indexes speed reads and slow writes; in a write-heavy OLTP table, over-indexing is a common wrong answer.

Related terms