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

From Tom Lane
Subject Re: Best way to scan on-disk bitmaps
Date
Msg-id 12035.1115928615@sss.pgh.pa.us
Whole thread Raw
In response to Best way to scan on-disk bitmaps  ("Victor Y. Yegorov" <viy@mits.lv>)
Responses Re: Best way to scan on-disk bitmaps
List pgsql-hackers
"Victor Y. Yegorov" <viy@mits.lv> writes:
> I have questions on how to implement on-disk bitmap scan.

I think your best plan might be

1. Be sure that all the indexable WHERE conditions are passed to the  indexscan as indexquals.  This might be,
say,WHEREa = 42 and b = 'foo'
 

2. Within the index AM, form the AND of the relevant bitmaps (here the  ones for a = 42 and b = 'foo').

3. Within the index AM, pick up the TIDs for the remaining one-bits,  and pass them back.

4. Let the existing machinery handle the OR-ing problem as well as  actual fetching of the heap rows.

This can be done without any restructuring of the index AM API.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Views, views, views: Summary of Arguments
Next
From: Robert Treat
Date:
Subject: Re: Server instrumentation for 8.1