Re: Best way to scan on-disk bitmaps - Mailing list pgsql-hackers

From Manfred Koizar
Subject Re: Best way to scan on-disk bitmaps
Date
Msg-id ja8f815ef3o3o6eab4gu6fo223p43iqq1a@4ax.com
Whole thread Raw
In response to Re: Best way to scan on-disk bitmaps  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Views, views, views! (long)
Next
From: Tom Lane
Date:
Subject: Re: Best way to scan on-disk bitmaps