Re: nested loop semijoin estimates

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: nested loop semijoin estimates
Дата
Msg-id 556917C9.6050709@2ndquadrant.com
обсуждение исходный текст
Ответ на nested loop semijoin estimates  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: nested loop semijoin estimates  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers

On 05/30/15 01:20, Tomas Vondra wrote:
>
> Notice the cost - it's way lover than the previous plan (9.2 vs
> ~111k), yet this plan was not chosen. So either the change broke
> something (e.g. by violating some optimizer assumption), or maybe
> there's a bug somewhere else ...

After a bit more investigation, what I think is happening here is 
add_path() does not realize this is a SEMI join and a single tuple is 
enough, and discards the simple indexscan path in favor of the bitmap 
index scan as that seems cheaper when scanning everything.

So not really a bug, but maybe 'consider_startup' would help?


--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: [Proposal] More Vacuum Statistics