Re: [PATCH] bitmap indexes

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, bausch(at)dvs(dot)tu-darmstadt(dot)de
Subject: Re: [PATCH] bitmap indexes
Date: 2013-09-24 16:51:00
Message-ID: CAMkU=1yPwJNvOLfDK2oXNWdL_x19K9L_Q_d6X=_+g-iNsPYFew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 14, 2013 at 11:14 AM, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>wrote:

> Hi.
>
> This is a cleaned-up and rebased version of the bitmap index patch from
> Gavin Sherry, later revised by Gianni Ciolli and Gabriele Bartolini, and
> others including Daniel Bausch.
>
> I've been working on this patch for a while, and have made some progress
> towards (a) general fixing, and (b) a working VACUUM implementation (the
> major remaining piece). Unfortunately, I've been busy moving house, and
> the latter is not complete (and not in this patch).
>
> I will continue working on the code, and I'll post updates. I expect to
> have more to show in just a few days.
>
> Nevertheless, I'm posting it for review now as I keep working. Given the
> size and age of the patch, I would appreciate any comments, no matter
> how nitpicky.
>

Hi Abhijit,

I get wrong answers from this index sometimes. It seems to occur when the
position of the column within the index is not the same as its position
within the table. So I think that what is happening is somewhere the
offset into the list of table columns is misused to offset into the list of
index columns.

I didn't see any XXX notes that indicate this is a known problem.

create table foo as select
floor(random()*10) as a,
floor(random()*10) as b,
floor(random()*10) as c,
d
from generate_series(1,10000000) d;

vacuum ANALYZE;
create index on foo using bitmap (a);
create index on foo using bitmap (b);

select count(*) from foo where a=4;
1000173
select count(*) from foo where a+0=4;
1000173

select count(*) from foo where b=4;
0
select count(*) from foo where b+0=4;
999750

Cheers,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-09-24 16:51:04 Re: FW: REVIEW: Allow formatting in log_line_prefix
Previous Message Robert Haas 2013-09-24 16:46:33 Re: SSL renegotiation