bloom
bloom access method - signature file based index
bloom : bloom access method - signature file based index
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2990 | bloom | bloom | 1.0 |
FEAT | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | rum hll roaringbitmap pgfaceting parray_gin btree_gin btree_gist intarray |
Packages
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
This is a built-in contrib extension ship with the PostgreSQL kernel
Install
Create this extension with:
Usage
The bloom extension provides an index access method based on Bloom filters. A Bloom filter is a space-efficient data structure that tests whether an element is a member of a set, with possible false positives but no false negatives.
Bloom indexes are particularly useful for tables with many columns where queries test arbitrary combinations of columns. A single bloom index can replace multiple btree indexes while using significantly less space.
Create Bloom Index
With custom parameters:
Parameters
| Parameter | Default | Max | Description |
|---|---|---|---|
length |
80 | 4096 | Length of each signature in bits (rounded to nearest 16) |
col1 - col32 |
2 | 4095 | Number of bits generated for each index column |
Operator Class Support
Bloom indexes only support the equality operator (=). Built-in operator classes exist for int4 and text. You can define custom operator classes for other types that have a hash function:
Example
Limitations
- Only equality (
=) queries are supported (no range queries) - Does not support
UNIQUEindexes - Does not support searching for
NULLvalues - Results require recheck against heap due to false positives