Re: Partitioning Optimizer Questions and Issues

2019-02-11 Thread keith anderson
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

Re: Partitioning Optimizer Questions and Issues

2019-02-08 Thread Justin Pryzby
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