Re: [PATCH] bitmap indexes

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: [PATCH] bitmap indexes
Дата
Msg-id CAMkU=1yPwJNvOLfDK2oXNWdL_x19K9L_Q_d6X=_+g-iNsPYFew@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] bitmap indexes  (Abhijit Menon-Sen <ams@2ndquadrant.com>)
Ответы Re: [PATCH] bitmap indexes  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Список pgsql-hackers
On Sat, Sep 14, 2013 at 11:14 AM, Abhijit Menon-Sen <ams@2ndquadrant.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: SSL renegotiation
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: FW: REVIEW: Allow formatting in log_line_prefix