"Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de> writes: > This post summarizes a few weeks of research of ANALYZE statistics > distribution on one of our bigger production databases with some real-world > data and proposes a patch to rectify some of the oddities observed.
It would be great if some folks could find a moment to run the queries I was showing on their data to confirm (or refute) my findings, or to contribute to the picture in general.
As I was saying, the queries were designed in such a way that even unprivileged user can run them (the results will be limited to the stats data available to that user, obviously; and for custom-tailored statstarget one still needs superuser to join the pg_statistic table directly). Also, on the scale of ~30k attribute statistics records, the queries take only a few seconds to finish.