Re: Best way to scan on-disk bitmaps

Поиск
Список
Период
Сортировка
От Manfred Koizar
Тема Re: Best way to scan on-disk bitmaps
Дата
Msg-id ja8f815ef3o3o6eab4gu6fo223p43iqq1a@4ax.com
обсуждение исходный текст
Ответ на Re: Best way to scan on-disk bitmaps  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 12 May 2005 17:40:06 -0400, Tom Lane <tgl@sss.pgh.pa.us>
wrote:
>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.  This is true for btree [...]

It's not difficult to setup a test case where an index is used, but
only with a=42 as an index condition, and c='foo' is applied as a
filter condition.  Now add a redundant condition on b... AND b BETWEEN minb AND maxb ...
and watch how c='foo' moves into the index condition.

I did this test some time ago and I believe that adding the condition
on b did not change the estimated cost, only the actual execution
time.

ServusManfred



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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Views, views, views! (long)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Best way to scan on-disk bitmaps