
Extended Statistics
Nikolay and Michael discuss the CREATE STATISTICS feature in Postgres — what it's for, how often it's used, and how to spot cases where it would help.
Here are some links to things they mentioned:
Here are some links to things they mentioned:
- CREATE STATISTICS https://www.postgresql.org/docs/current/sql-createstatistics.html
- citext https://www.postgresql.org/docs/current/citext.html
- Statistics Used by the Planner https://www.postgresql.org/docs/current/planner-stats.html
- default_statistics_target https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-DEFAULT-STATISTICS-TARGET
- Tomáš Vondra on Postgres TV https://www.youtube.com/watch?v=8la-OWfD3VI
- Recent commit to Postgres 18 for pg_upgrade https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1fd1bd871012732e3c6c482667d2f2c56f1a9395
- Multivariate Statistics Examples https://www.postgresql.org/docs/current/multivariate-statistics-examples.html
- Extended statistics (README) https://github.com/postgres/postgres/blob/master/src/backend/statistics/README
- How we used Postgres extended statistics to achieve a 3000x speedup (blog post by Jared Rulison) https://build.affinity.co/how-we-used-postgres-extended-statistics-to-achieve-a-3000x-speedup-ea93d3dcdc61
~~~
What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc!
~~~
Postgres FM is produced by:
- Michael Christofides, founder of pgMustard
- Nikolay Samokhvalov, founder of Postgres.ai
With credit to:
- Jessie Draws for the elephant artwork