0Pricing
PostgreSQL Performance & Query Optimization · Lesson

BRIN Indexes for Large Sequential Data

Discover BRIN (Block Range INdexes), a tiny index type ideal for huge tables whose data is naturally ordered, such as time-series and append-only logs.

What is a BRIN Index?

A BRIN (Block Range INdex) stores summary information about ranges of physical table blocks instead of pointing at individual rows. Each entry covers many pages, so the index is extremely small.

How BRIN Differs from B-tree

A B-tree has one entry per row and can be large. A BRIN keeps just the min and max value for each block range.

  • B-tree: precise, big, great for random lookups
  • BRIN: approximate, tiny, great for range scans on ordered data

All lessons in this course

  1. Hash, GIN, and GiST Indexes
  2. Partial and Expression Indexes
  3. Covering Indexes and Index-Only Scans
  4. BRIN Indexes for Large Sequential Data
← Back to PostgreSQL Performance & Query Optimization