Re: Slow query: bitmap scan troubles

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: Slow query: bitmap scan troubles
Дата
Msg-id CAGTBQpaueZhezPjfM8Vaw1UExeYJh6jR6+6S0Qk_k59Bb5m=MQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Slow query: bitmap scan troubles  (<postgresql@foo.me.uk>)
Список pgsql-performance
On Tue, Dec 4, 2012 at 3:03 PM,  <postgresql@foo.me.uk> wrote:
>
> Though that doesn't account for the 70x difference between the speed of the
> two queries in actuality given a pretty similar expected speed (does it?).
> It does go some way to explaining why a bad choice of plan was made.

I still don't think it does. I still think the problem is the GUC settings.

The slow plan joins in a way that processes all 3M rows in both sides
of the join, and pg knows it.
The fast plan only processes 5k of them. And pg knows it. Why is it
choosing to process 3M rows?

If there's negative correlation, it only means less rows will be
produced, but the nested loop and and the right-hand index scan still
happens.


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

Предыдущее
От:
Дата:
Сообщение: Re: Slow query: bitmap scan troubles
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Slow query: bitmap scan troubles