- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit7516f52
committed
BRIN: Block Range Indexes
BRIN is a new index access method intended to accelerate scans of verylarge tables, without the maintenance overhead of btrees or othertraditional indexes. They work by maintaining "summary" data aboutblock ranges. Bitmap index scans work by reading each summary tuple andcomparing them with the query quals; all pages in the range are returnedin a lossy TID bitmap if the quals are consistent with the values in thesummary tuple, otherwise not. Normal index scans are not supportedbecause these indexes do not store TIDs.As new tuples are added into the index, the summary information isupdated (if the block range in which the tuple is added is alreadysummarized) or not; in the latter case, a subsequent pass of VACUUM orthe brin_summarize_new_values() function will create the summaryinformation.For data types with natural 1-D sort orders, the summary info consistsof the maximum and the minimum values of each indexed column within eachpage range. This type of operator class we call "Minmax", and wesupply a bunch of them for most data types with B-tree opclasses.Since the BRIN code is generalized, other approaches are possible forthings such as arrays, geometric types, ranges, etc; even for thingssuch as enum types we could do something different than minmax withbetter results. In this commit I only include minmax.Catalog version bumped due to new builtin catalog entries.There's more that could be done here, but this is a good step forwards.Loosely based on ideas from Simon Riggs; code mostly by Álvaro Herrera,with contribution by Heikki Linnakangas.Patch reviewed by: Amit Kapila, Heikki Linnakangas, Robert Haas.Testing help from Jeff Janes, Erik Rijkers, Emanuel Calvo.PS: The research leading to these results has received funding from the European Union's Seventh Framework Programme (FP7/2007-2013) under grant agreement n° 318633.1 parent1961b1c commit7516f52
File tree
57 files changed
+6807
-24
lines changed- contrib
- pageinspect
- pg_xlogdump
- doc/src/sgml
- src
- backend
- access
- brin
- common
- heap
- rmgrdesc
- transam
- catalog
- replication/logical
- storage/page
- utils/adt
- include
- access
- catalog
- storage
- utils
- test/regress
- expected
- output
- sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
57 files changed
+6807
-24
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
|
0 commit comments
Comments
(0)