HeadlinesBriefing favicon HeadlinesBriefing.com

BRIN Index Degrades After 5% Row Updates

Hacker News •
×

BRIN indexes in Postgres are compact and fast for large, naturally ordered tables, but they degrade sharply after just 5% of rows are updated. Tests on a 10M row table show execution time jumps from 21 ms to 691 ms, and heap pages scanned rise from 1,536 to 51,268. The root cause is that updates scatter new row versions across the heap, breaking the physical correlation that BRIN relies on.

Unlike B-trees, BRIN has no mechanism to recover from this disorder short of a full rebuild. The author, who co-owned Oracle's Zonemaps, warns that BRIN's design is elegant but fragile under write churn.