Index · TL;DR
1 min readRapid overview
TL;DR
A relational database stores data in tables (rows × typed columns), enforces integrity with keys and constraints, and gives you ACID transactions so concurrent work doesn't corrupt data. You read and write it with SQL. Almost every real performance problem comes down to a handful of things: the right index (or a missing one), a query the planner can actually use that index for (SARGable predicates), not doing N+1 round-trips, the right isolation level, and not pulling more rows/columns than you need. Optimization is a loop: measure with the query plan (EXPLAIN ANALYZE) → form a hypothesis → change one thing → re-measure. Don't guess, and don't add indexes blindly — every index speeds reads but slows writes and costs storage.