Adjust ndistinct for eqjoinsel

Поиск
Список
Период
Сортировка
От Zhenghua Lyu
Тема Adjust ndistinct for eqjoinsel
Дата
Msg-id CO6PR05MB750605D9F88AAFFB95658BABB58B9@CO6PR05MB7506.namprd05.prod.outlook.com
обсуждение исходный текст
Ответы Re: Adjust ndistinct for eqjoinsel  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,
    I run TPC-DS benchmark for Postgres and find the join size estimation has several problems.
    For example, Ndistinct is key to join selectivity's estimation, this value does not take restrictions
    of the rel, I hit some cases in the function eqjoinsel, nd is much larger than vardata.rel->rows.
   
    Accurate estimation need good math model that considering dependency of join var and vars in restriction.
    But at least, indistinct should not be greater than the number of rows. 

    See the attached patch to adjust nd in eqjoinsel.

Best,
Zhenghua Lyu
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Allowing REINDEX to have an optional name
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Doc about how to set max_wal_senders when setting minimal wal_level