Re: Weird plan variation with recursive CTEs

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: Weird plan variation with recursive CTEs
Дата
Msg-id CAGTBQpaNWKtgn3C6vcPrQcP2S0uH1bF23se=2HLjkc9AkjdXyQ@mail.gmail.com
обсуждение исходный текст
Ответ на Weird plan variation with recursive CTEs  (Claudio Freire <klaussfreire@gmail.com>)
Ответы Re: Weird plan variation with recursive CTEs
Список pgsql-performance
On Thu, Apr 26, 2012 at 2:37 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> Fun thing is, nothing in the CTE's execution really changed. The only
> change, is that now a sequential scan of overview was chosen instead
> of the index.
> Why could this be? The output (number of search values, even the
> values themselves and their order) is the same between both plans.

I just noticed it's misestimating the output of the union distinct,
but not of the select distinct.

One would expect the estimation procedure to be the same in both cases.
Any reason for the difference? Any way to "teach" pg about it?

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

Предыдущее
От: John Lister
Дата:
Сообщение: Re: Configuration Recommendations
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: query optimization