Re: Understanding bad estimate (related to FKs?)

Поиск
Список
Период
Сортировка
От Philip Semanchuk
Тема Re: Understanding bad estimate (related to FKs?)
Дата
Msg-id BCDDA7C9-7999-4BFF-BDCA-7BF5E28A051C@americanefficient.com
обсуждение исходный текст
Ответ на Re: Understanding bad estimate (related to FKs?)  (Michael Lewis <mlewis@entrata.com>)
Список pgsql-performance

> On Nov 2, 2020, at 6:09 PM, Michael Lewis <mlewis@entrata.com> wrote:
>
> The query I asked about in the original post of this thread has 13 relations in it. IIUC, that's 13! or > 6 billion
possibleplans. How did the planner pick one plan out of 6 billion? I'm curious, both for practical purposes (I want my
queryto run well) and also because it's fascinating. 
>
> Have you increased geqo_threshold and join_collapse_limit from the defaults?


Yes, thanks you, I should have said that. We avoid the GEQO, so geqo_threshold=25, and
join_collapse_limit=from_collapse_limit=24.We tend to have long running queries, so we’re happy to pay a few seconds of
extra planner cost to increase the likelihood of getting a better plan. 

Cheers
Philip


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

Предыдущее
От: "Ehrenreich, Sigrid"
Дата:
Сообщение: Partition pruning with joins
Следующее
От: Philip Semanchuk
Дата:
Сообщение: Re: Understanding bad estimate (related to FKs?)