Bad plan on a huge table query

Поиск
Список
Период
Сортировка
От Daniel Cristian Cruz
Тема Bad plan on a huge table query
Дата
Msg-id CACffM9H_9fc1OZDyt2Kr4dt8Rvp5+p=2C-839rtTtpMeS5BbUg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bad plan on a huge table query  (Alban Hertroys <haramrae@gmail.com>)
Список pgsql-general
Hi,

I'm trying to figure out why does the planner found 1 row estimate using nested loops over a big table. There is no return from it:


It returns if disable nested loops, but the plan still poor:


I'm using PostgreSQL 9.2.3, default_statistics_target on 1000.

I can't remember what to make PostgreSQL sees a better estimate in the scan of aula_confirmacao and the join with presenca. I got rusty after a long time just doing modeling.

Does someone has some idea on that?

Thanks,
--
Daniel Cristian Cruz
クルズ クリスチアン ダニエル

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: How to join table to itself N times?
Следующее
От: Michael Orlitzky
Дата:
Сообщение: Re: State of the art re: group default privileges