From: | "Vladimir Sitnikov" <sitnikov(dot)vladimir(at)gmail(dot)com> |
---|---|
To: | "Gianni Ciolli" <gianni(dot)ciolli(at)2ndquadrant(dot)it> |
Cc: | "Teodor Sigaev" <teodor(at)sigaev(dot)ru>, "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Gabriele Bartolini" <gabriele(dot)bartolini(at)2ndquadrant(dot)it> |
Subject: | Re: Bitmap index - first look |
Date: | 2008-11-07 17:28:53 |
Message-ID: | 1d709ecc0811070928x30168345o2e597b5b55d77ee0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Could you please put more comments on the index build procedure?
I guess it strongly relies on the fact the block number increases as tuples
are returned from "heap scan", doesn't it? However, thanks to synchronized
scans the order of tuples could be a little bit different.
I found no evidence of "build index" being able to add tid # 10 after it
has created the bitmap for tids 1000...2000. As far as I understand it never
tries to update words that were written during index creation.
That particular "if (_blockno != buf->hot_buffer_block) {" in
buf_add_tid_with_fill looks to be a wrong thing for me -- I believe it is a
way to often (it will try to sync the buffer after each 300/8=~40 bytes
since there are no more than 300 tuples on a single page)
I would not flush the bitmap every data block, but I would keep "hot buffer"
as a temporary view (uncompressed) of the bitmap being build. So as tuples
come, we either set the bit directry in the "hot buffer" (if it covers the
relevant tid range) or flush that view to the bitmap (merging, and splitting
the bitmap where it is required) and repoint the window so it starts with
block of tid that triggered flushing. Does that make sense?
Regards,
Vladimir Sitnikov
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2008-11-07 17:39:18 | Re: Distinct types |
Previous Message | Jeff Davis | 2008-11-07 17:24:37 | Re: Distinct types |