forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit77b88cd
committed
BRIN bloom indexes
Adds a BRIN opclass using a Bloom filter to summarize the range. Indexesusing the new opclasses allow only equality queries (similar to hashindexes), but that works fine for data like UUID, MAC addresses etc. forwhich range queries are not very common. This also means the indexeswork for data that is not well correlated to physical location withinthe table, or perhaps even entirely random (which is a common issue withexisting BRIN minmax opclasses).It's possible to specify opclass parameters with the usual Bloom filterparameters, i.e. the desired false-positive rate and the expected numberof distinct values per page range. CREATE TABLE t (a int); CREATE INDEX ON t USING brin (a int4_bloom_ops(false_positive_rate = 0.05, n_distinct_per_range = 100));The opclasses do not operate on the indexed values directly, but computea 32-bit hash first, and the Bloom filter is built on the hash value.Collisions should not be a huge issue though, as the number of distinctvalues in a page ranges is usually fairly small.Bump catversion, due to various catalog changes.Author: Tomas Vondra <tomas.vondra@postgresql.org>Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>Reviewed-by: Sokolov Yura <y.sokolov@postgrespro.ru>Reviewed-by: Nico Williams <nico@cryptonector.com>Reviewed-by: John Naylor <john.naylor@enterprisedb.com>Discussion:https://postgr.es/m/c1138ead-7668-f0e1-0638-c3be3237e812@2ndquadrant.comDiscussion:https://postgr.es/m/5d78b774-7e9c-c94e-12cf-fef51cc89b1a%402ndquadrant.com1 parenta681e3c commit77b88cd
File tree
17 files changed
+2567
-8
lines changed- doc/src/sgml
- src
- backend/access/brin
- include/catalog
- test/regress
- expected
- sql
17 files changed
+2567
-8
lines changedLines changed: 225 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
|
0 commit comments
Comments
(0)