Re: Best way to scan on-disk bitmaps

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Best way to scan on-disk bitmaps
Дата
Msg-id 19469.1116185271@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Best way to scan on-disk bitmaps  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Best way to scan on-disk bitmaps  (Oleg Bartunov <oleg@sai.msu.su>)
Re: Best way to scan on-disk bitmaps  (Greg Stark <gsstark@mit.edu>)
Re: Best way to scan on-disk bitmaps  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>>> Hmm.  That particular case will work, but the planner believes that only
>>> consecutive columns in the index are usable --- that is, if you have
>>> quals for a and c but not for b, it will think that the condition for c
>>> isn't usable with the index.
>>
>> We do have a TODO for this:
>> 
>> * Use index to restrict rows returned by multi-key index when used with
>> non-consecutive keys to reduce heap accesses

> That TODO is something else. 

No, I think Bruce is right --- it's essentially the same thing.  It
certainly would be a good idea to change btrees to work like that,
if we are going to modify the planner to relax the restriction for
other index types.

I think it would be easy to change the planner and btree to handle
this (where "easy" means "I remember where all the skeletons are
buried").  But I don't know the gist code hardly at all.  Can anyone
offer an informed opinion on whether gist can handle this now, and
if not what it would take to handle it?

(hash and rtree are not at issue since they don't support multi-key
indexes.)
        regards, tom lane


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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Best way to scan on-disk bitmaps
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Best way to scan on-disk bitmaps