How PostgreSQL executes a query
From SQL text to rows: parsing, analysis, rewriting, planning, and execution, plus where EXPLAIN ANALYZE fits and why the planner sometimes chooses the wrong path.
Topics
2 articles
From SQL text to rows: parsing, analysis, rewriting, planning, and execution, plus where EXPLAIN ANALYZE fits and why the planner sometimes chooses the wrong path.
A pool limits concurrency. Past that limit, requests queue, and the wait never appears in database metrics. Here is how to size the pool from a request deadline instead of a guess.