Thanks for the feedback Justin.
You are right, the most-common-values list is empty for my test case and so it
is using n_distinct for the 'id IN()' scenario.And I can see that with the
pg_class.reltuples and the pg_stats.histogram_bounds values how the optimizer
can conclude with my range que
On Fri, Feb 08, 2019 at 11:13:51AM +, keith anderson wrote:
> So to summarise the findings/questions from above:
> - It seems like the Postgres optimizer sometimes uses the partition level
> statistics, and sometimes the global table level statistics? Or is it using
> something else?- With pa
I am using Postgres on a large system (recording approximately 20million
transactions per day). We use partitioning by date to assist with both vacuum
processing time and to archive old data. At the core of the system are records
in 2 different tables detailing different types of activity for mo