Re: Extra cost of "lossy mode" Bitmap Scan plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extra cost of "lossy mode" Bitmap Scan plan
Дата
Msg-id 2679.1240929258@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Extra cost of "lossy mode" Bitmap Scan plan  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Apr 28, 2009 at 3:51 AM, Greg Stark <stark@enterprisedb.com> wrote:
>> If the logic you're suggesting would kick in at all it would be for a
>> narrow range of scan sizes,

> You may be right, but on the other hand, I'm not sure there's any
> sense in NOT trying to model the impact of the additional heap
> fetches.

I think it's probably useless.  In the first place, at reasonable values
of work_mem the effect is going to be negligible (in the sense that a
plain indexscan would never win).  In the second place, there isn't any
way to guess the extent of lossiness at plan time --- it depends on how
much the target rows are "clumped" on particular pages.  The planner
hasn't got any stats that would let it guess that, and even if we tried
to collect such stats they'd probably be too unstable to be useful.

There are boatloads of effects that the planner doesn't model.  This
one seems very far down the list of what we should worry about.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Clean shutdown and warm standby
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Extra cost of "lossy mode" Bitmap Scan plan