Re: Understanding bad estimate (related to FKs?)

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Understanding bad estimate (related to FKs?)
Дата
Msg-id CAHOFxGpcN+=Vo10=2roxOOm8UXu8zstdaggRq0vvu00wcC6YjQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Understanding bad estimate (related to FKs?)  (Philip Semanchuk <philip@americanefficient.com>)
Ответы Re: Understanding bad estimate (related to FKs?)
Список pgsql-performance
On Mon, Oct 26, 2020 at 11:14 AM Philip Semanchuk <philip@americanefficient.com> wrote:
>> The item I'm focused on is node 23. The estimate is for 7 rows, actual is 896 (multiplied by 1062 loops). I'm confused about two things in this node.
>>
>> The first is Postgres' estimate. The condition for this index scan contains three expressions --
>>
>> (five_uniform = zulu_five.five_uniform) AND
>> (whiskey_mike = juliet_india.whiskey_mike) AND
>> (bravo = 'mike'::text)

Are the columns correlated? Have you tried to create extended statistics and see if the estimate changes? I believe that extended stats will not directly help with joins though, only group bys and perhaps choosing an index scan vs table scan when comparing the correlated columns to static values rather than joining up tables. Wouldn't be much effort to try it though.

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

Предыдущее
От: Philip Semanchuk
Дата:
Сообщение: Re: Understanding bad estimate (related to FKs?)
Следующее
От: Philip Semanchuk
Дата:
Сообщение: Re: Understanding bad estimate (related to FKs?)