Query Optimization 101

SELECT * is bad.

Overview

Query optimization 101 writes queries that scale with data growth. Schema design sets the ceiling; query patterns determine whether the team approaches it. The discipline replaces speculation with the query plan.

The approach

The practical approach: EXPLAIN ANALYZE before optimisation, indexes that match access patterns, batching for N+1, explicit columns, documented rationale per non-obvious query. The team’s discipline produces fast queries that survive data growth.

Why this compounds

Query optimization discipline compounds across services. Each optimized query produces ongoing performance; the team’s database expertise grows; new queries inherit the patterns.

Query optimization discipline is a database discipline that pays off across years. Nova AI Ops integrates with database telemetry, surfaces patterns, and supports the team’s database engineering discipline.