Backend6 min read
JD
John Doe
Jul 2, 2026 • Updated Sep 5, 2026
Good SQL is readable first and fast second — and careful measurement helps with both.
Start with the query plan
Use PostgreSQL's planning tools to understand scans, joins, and the amount of data being processed.
Index intentionally
Indexes should support real access patterns. Each index also has a write and storage cost.
Keep transactions focused
Short, predictable transactions reduce contention and make application behavior easier to reason about.