EXPLAIN ANALYZE or EXPLAIN (ANALYZE, BUFFERS)?
UPDATE 2025: Starting with Postgres 18, the `BUFFERS` option becomes default in `EXPLAIN ANALYZE`, which is great news.
UPDATE 2025: Starting with Postgres 18, the `BUFFERS` option becomes default in `EXPLAIN ANALYZE`, which is great news.
Benchmarking is a huge topic. Here, we cover minimal steps that are required for a Postgres benchmark to be informative, useful, and correct.
Detect, measure, and eliminate table and index bloat to maintain database health
Identify and handle long-running transactions that can impact OLTP system performance
"Slow" is a relative concept. In some cases, we might be happy with query latency 1 minute (or no?), while in other scenarios, even 1 ms might seem to be too…
In a few hours, I'm presenting my "Seamless Postgres query optimization" tutorial at DjangoCon US, so it's a good time to talk about transitioning from…
Learn how to how to run analyze (to collect statistics)
After a series of rather hefty posts, let's take a breather with some lighter material.
Today we'll discuss how to understand what exactly a Postgres backend is doing inside CPU on a Linux machine (in-CPU analysis).
Understand subtransactions, savepoints, and their impact on database performance
There are two big branches of query optimization: