[Bizgres-general] A bitmap index access method is available in
bizgres CVS tip
Mark Kirkwood
markir at paradise.net.nz
Mon Dec 19 08:25:14 GMT 2005
Mark Kirkwood wrote:
> Looking at the original setup again (the 3 indexes), a quick display of
> the pagesizes of the various relations shows:
>
> Bizgres current:
> bitmap=# select relname,relpages from pg_class
> where relname like 'bitmaptest%'
> or relname like 'bm_internal_t2200bitmaptest%';
> relname | relpages
> ------------------------------------+----------
> bitmaptest | 93458
> bitmaptest_id | 21899
> bitmaptest_val0 | 19363
> bitmaptest_val1 | 19360
> bitmaptest_val2 | 70125
> bm_internal_t2200bitmaptest_val0_0 | 1
> bm_internal_t2200bitmaptest_val1_0 | 1
> bm_internal_t2200bitmaptest_val2_0 | 1
> (8 rows)
>
>
> Postgres 8.1:
> bitmap=# select relname,relpages from pg_class
> where relname like 'bitmaptest%'
> bitmap-# ;
> relname | relpages
> ------------------------------------+----------
> bitmaptest | 88496
> bitmaptest_id | 21899
> bitmaptest_val0 | 21899
> bitmaptest_val1 | 21899
> bitmaptest_val2 | 21899
> (5 rows)
>
>
> That (bitmapped) bitmaptest_val2 is relatively big at ~600Mb, so I'm
> wondering if the 100 distinct values is just at the point where the
> bitmap is getting inflated. Thoughts?
>
> Cheers
>
> Mark
>
>
One other thing comes to mind - apologies for the drip-feed of the
thoughts on this, but its how they are coming to me as well :-)
In fact *all* the (bitmapped) indexes seem to have a fairly large
on-disk footprint - about the same as btree. Is that expected?
I have not looked specifically at how this has been implemented (am
going to tomorrow), But thinking aloud (so to speak), concerning my
(possibly completely wrong - apologies if so) theoretical understanding
of how bitmap indexes work:
10 value bitmap for 10000000 rows requires 10*10000000/8 = 12500000 (~12Mb).
This is quite small (whereas the 10 value bitmap indexes are ~150Mb).
To actually use the bitmap you need a map between the bitmap "array"
position and blocknumber,itemid (or similar) of the heap relation. I am
guessing that is what your "bm_internal_t*" guys do(?). Is this where
the extra space is being used? (the on-disk bm_* are very small, so I
guess it is not).
Cheers in confusion :-)
Mark
More information about the Bizgres-general
mailing list