Re: BUG #16521: n_distinct_inherited does not affect child partitions when set on main partition

Поиск
Список
Период
Сортировка
От Klaudie Willis
Тема Re: BUG #16521: n_distinct_inherited does not affect child partitions when set on main partition
Дата
Msg-id Y7I4lHv5Ms8rOZyXQ6gS3LG7kuhw4dCZVNZcbz6fHtGk4-mn1LRSFfEWmNt-C3amHkSYGSuLstm7brL9OD6HPL9X148AUyjewV2au9sHoaM=@protonmail.com
обсуждение исходный текст
Ответ на Re: BUG #16521: n_distinct_inherited does not affect child partitions when set on main partition  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: BUG #16521: n_distinct_inherited does not affect child partitions when set on main partition  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs
Thanks for you thorough answer!

 "n_distinct affects the statistics for the table itself, while n_distinct_inherited affects the statistics
 gathered for the table plus its inheritance children."

I see that this text has multiple interpretations. I read it more like: while n_distinct_inherited affects the
statisticsgathered [by analyze] for the table plus [affects the statistics of] its inheritance children. 

The core problem for me was that I had to set n_distinct manually on my individual partitions for the planner to choose
asane plan for queries on the declared partition.  The data for a column was so skewed that the analyzers n_distinct
wasoff by a factor of 1000X, which made all partitions do a table scan instead of index scan.  In my mind, setting the
declarativepartition variable n_distinct_inherited would solve that; but obviously I am wrong on that. 

Klaudie




В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [bug] Table not have typarray when created by single user mode
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16523: The wal logs fill the disk and are not cleaned up