Re: Bloom index

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Bloom index
Дата
Msg-id 407d949e1001171829l2e79b32av8413e5ba59e63440@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bloom index  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: Bloom index  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Bloom index  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
2010/1/13 Teodor Sigaev <teodor@sigaev.ru>:
>> This is pretty darn slick.  I haven't looked at the code yet, but the
>
> It's just a prototype and/or proof of concept

The only thing that jumps out at me from the code itself is the use of
rand() and srand() which seems unacceptable. At the very least the
srand(attno) step should be precalculated and stored in the metapage.
At least that would make it safe against data type hash functions
which could call rand() themselves.

However this doesn't seem like a very good use of bloom filters to me.Here your sets are always the same size, the n
columns,and the order 
is significant. What you're testing is whether the hash value for a
specific column is present in your "set" of hash values for the
columns of that row.

Bloom filters need to be sized to have n bits per set element to
maintain a targeted false positive rate. And that false positive rate
would be higher than just having an n bit hash for each set element.
Normally they have the advantage that you can test for membership
anywhere in the set quickly -- but in this case you actually only want
to test a specific position in the set anyways.

So I think you can get a lower false positive rate by just truncating
the each column's hash value to n bits and storing an array of them.

--
greg


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: AtAbort_Portsl problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bloom index