Re: Recognizing range constraints (was Re: [PERFORM] Plan for relatively simple query seems to be very inefficient)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Recognizing range constraints (was Re: [PERFORM] Plan for relatively simple query seems to be very inefficient)
Дата
Msg-id 6827.1112828794@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Recognizing range constraints (was Re: [PERFORM] Plan for relatively simple query seems to be very inefficient)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
John A Meinel <john@arbash-meinel.com> writes:
> Actually, I think he was saying do a nested loop, and for each item in
> the nested loop, re-evaluate if an index or a sequential scan is more
> efficient.

> I don't think postgres re-plans once it has started, though you could
> test this in a plpgsql function.

It doesn't, and in any case that's a microscopic view of the issue.
The entire shape of the plan might change depending on what we think
the selectivity is --- much more than could be handled by switching
scan types at the bottom level.

Also, I anticipate that bitmap-driven index scans will change things
considerably here.  The range of usefulness of pure seqscans will
drop drastically...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Recognizing range constraints (was Re: [PERFORM] Plan for relatively simple query seems to be very inefficient)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Recognizing range constraints (was Re: [PERFORM] Plan for