EXPLAIN (ANALYZE) needs BUFFERS to improve the Postgres query optimization process | Postgres.AI
Jupiter's moon IO. Credit: ALMA (ESO/NAOJ/NRAO), I. de Pater et al.; NRAO/AUI NSF, S. Dagnello; NASA/JPL/Space Science Institute SQL query optimization is challenging for those who have just started working with PostgreSQL. There are many objective reasons for this, such as: All these barriers are reasonable. They limit the number of engineers possessing well-developed Postgres query optimization skills. However, there is a specific artificial barrier that is rather influential and which is relatively easy to eliminate. Here it is: the EXPLAIN command has the BUFFERS option disabled by default. I am sure it has to be enabled and used by everyone who needs to do some SQL optimization work. The BUFFERS option helps us see how much IO work Postgres did when executing each node in the query execution plan. For database systems, which mostly perform IO-intensive operations, dealing with too many data pages (or "buffers", "blocks" – depending on the context) is the most popular reason for po
Jupiter's moon IO . Credit: ALMA (ESO/NAOJ/NRAO), I. de Pater et al.; NRAO/AUI NSF, S. Dagnello; NASA/JPL/Space Science Institute SQL query optimization is challenging for those who have just started working with PostgreSQL. There are many objective reasons for this, such as: the difficulty of the field of system performance in general, lack of good "playground" environments where people can experience how databases work at a larger scale, lack of certain capabilities in Postgres observability tools that are still developing (though, at a good pace), insufficiency of good educational materials
related reading
- Making Postgres 42,000x slower because I am unemployedbyteofdev.com
- Scaling PostgreSQL to power 800 million ChatGPT users | OpenAIopenai.com
- Nine ways to shoot yourself in the foot with PostgreSQLphilbooth.me
- Making 768 servers look like 1 — PlanetScaleplanetscale.com
- Training a 4B model to produce 81% faster query plans than Postgresrohanbansal.com
- Training a 4B model to produce 81% faster query plans than Postgresrohanbansal.com
- The startup's Postgres survival guidehatchet.run
- Databases are Fucking Stupid | Probably Danceprobablydance.com
- The only scalable delete in Postgres is DROP TABLE — PlanetScaleplanetscale.com
- Explaining The Postgres Memeavestura.dev
- PgBouncer is useful, important, and fraught with peril - JP Camarajpcamara.com
- An Overview of Distributed PostgreSQL... | Crunchy Data Blogcrunchydata.com