🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Index

In plain terms

A database structure that makes looking up rows much faster.

Going deeper

An index keeps a sorted lookup of column values pointing to rows, so queries find matches without scanning the whole table. It speeds reads but adds storage and slows writes a little.

Under the hood

B-tree indexes suit range queries; hash indexes suit equality; composite indexes depend on column order. Over-indexing slows writes and bloats storage.

Examples

CREATE INDEX on email, primary-key indexes, covering indexes, full-text indexes.

Think of it like...

Like the index at the back of a book: instead of reading every page to find 'mitochondria', you jump straight to the listed pages.

Feedback & Bug Report