?

Log in

No account? Create an account

...

или внеочередные заметки


Previous Entry Share Next Entry
Bloom index for bigint
trekking, Himalaya
obartunov
Bloom index by default works for int4 and text, but other types with hash function and equality operator could be supported. Just use opclass interface, for example, for type bigint


CREATE OPERATOR CLASS bigint_ops
DEFAULT FOR TYPE bigint USING bloom AS
OPERATOR 1 =(bigint, bigint),
FU>CTION 1 hashint8(bigint);


Now, you can build bloom index for bigint data type.

PS.
Data types, which could be supported by bloom index.

SELECT oc.opcintype::regtype, p.amproc FROM pg_opclass oc
JOIN pg_amproc p ON p.amprocfamily = oc.opcfamily
WHERE oc.opcmethod = 405 AND oc.opcdefault AND p.amprocnum = 1
AND p.amproclefttype = oc.opcintype AND p.amprocrighttype = oc.opcintype;
Tags: , ,

  • 1
Oleg,
What exactly is a bloom index? Is it a particular type of a hash function?

Hope all is well with you.

Elein
elein@varlena.com

  • 1