</>CodexBash
All articles
Databases

Database indexes

Why a missing index turns a millisecond query into seconds: how B-tree indexes find rows, what they cost on writes, composite indexes and column order, covering indexes, when the database ignores an index, and how to check with EXPLAIN.

CodexBash, , 5 min read

The most common reason an application slows down as it grows is not the language, the framework or the server. It is a query without a suitable index, forcing the database to read every row in a table to find a handful. Adding the right index can turn a two-second query into a two-millisecond one. This article explains how indexes work, what they cost, and how to tell whether yours are being used.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.