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)
Список: pgsql-hackers


John A Meinel <> 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: prepared statements don't log arguments?
От: "Qingqing Zhou"
Дата:
Сообщение: Re: Did this issue ever get resolved?