Skip to content

Commit ab59610

Browse files
committed
BRIN minmax-multi indexes
Adds BRIN opclasses similar to the existing minmax, except that instead of summarizing the page range into a single [min,max] range, the summary consists of multiple ranges and/or points, allowing gaps. This allows more efficient handling of data with poor correlation to physical location within the table and/or outlier values, for which the regular minmax opclassed tend to work poorly. It's possible to specify the number of values kept for each page range, either as a single point or an interval boundary. CREATE TABLE t (a int); CREATE INDEX ON t USING brin (a int4_minmax_multi_ops(values_per_range=16)); When building the summary, the values are combined into intervals with the goal to minimize the "covering" (sum of interval lengths), using a support procedure computing distance between two values. Bump catversion, due to various catalog changes. Author: Tomas Vondra <[email protected]> Reviewed-by: Alvaro Herrera <[email protected]> Reviewed-by: Alexander Korotkov <[email protected]> Reviewed-by: Sokolov Yura <[email protected]> Reviewed-by: John Naylor <[email protected]> Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/5d78b774-7e9c-c94e-12cf-fef51cc89b1a%402ndquadrant.com
1 parent 77b88cd commit ab59610

File tree

19 files changed

+5286
-26
lines changed

19 files changed

+5286
-26
lines changed

doc/src/sgml/brin.sgml

Lines changed: 270 additions & 10 deletions
Large diffs are not rendered by default.

src/backend/access/brin/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ OBJS = \
1717
brin_bloom.o \
1818
brin_inclusion.o \
1919
brin_minmax.o \
20+
brin_minmax_multi.o \
2021
brin_pageops.o \
2122
brin_revmap.o \
2223
brin_tuple.o \

0 commit comments

Comments
 (0)