![[assets/str_idx_brin.png|256]] - **Description**: "Block Range INdex". It divides a table into ranges of physical blocks (default 128 blocks or 1MB) and stores a summary (minimum and maximum values) for each range. - **Data Structure**: - **REVMAP (Range Entry Vector Map)**: A physical mapping array that translates a block range number to the physical TID of the index page containing that range's summary. This allows $O(1)$ lookups of summary data. - **Summarization**: BRIN expects data to be physically sorted (e.g., by `created_at`). If a range contains values that overlap with many other ranges, the index loses its filtering power (becoming "soft"). - **Supported Operators**: `<`, `<=`, `=`, `>=`, `>`. - **Special Features**: - **Autosummarize**: A background worker periodically scans unsummarized blocks to update the index without requiring manual `VACUUM`. - **Bitmap Index Scans**: BRIN always produces a bitmap, as it can only tell the engine which *ranges* of pages to scan, not exact rows. - **Metaphor**: Summary labels on a long row of massive depot boxes. The **REVMAP** is the clipboard telling you exactly which shelf holds the label for Box #500. You don't open the box; the label just says "Items 500-600 are in here."