21
List of Zones Containing Summary Information
A zone spans a group of consecutive pages
summary information: minimum, maximum, and so on
Correlation with the physical location of rows is required.
Does not maintain item pointers to tuple versions.
Only a bit map scan
Designed for very large tables
compact size
configurable size-accuracy ratio
BRIN Index
Using operator classes, you can select the summary data stored in the index
for each zone. This can range from just minimum and maximum values to
multiple value ranges, and for geometric data types, it can store an
enclosing rectangle (as in GiST).
Regardless of the case, BRIN requires a correlation between column values
and the physical row location to function effectively, ensuring that values
with similar summary information are grouped into the same zone. Data
updates can disrupt the correlation, potentially impacting the index's
efficiency.
Since BRIN does not store row version pointers, it returns an approximate
bit map of the zone's pages. Standard index scans (and index-only scans)
are not possible.
However, the BRIN index has a very small size and can be adjusted by
specifying the zone size. The larger the zone, the smaller the index, but the
lower the accuracy. This makes BRIN a perfect fit for massive tables
commonly found in data warehouses.