Re: Best way to scan on-disk bitmaps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Victor Y(dot) Yegorov" <viy(at)mits(dot)lv>
Cc: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Best way to scan on-disk bitmaps
Date: 2005-05-12 20:10:15
Message-ID: 12035.1115928615@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Victor Y. Yegorov" <viy(at)mits(dot)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,
WHERE a = 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2005-05-12 20:29:02 Re: Server instrumentation for 8.1
Previous Message Andrew Dunstan 2005-05-12 20:03:39 Re: Views, views, views: Summary of Arguments