Use BRIN when physical order correlates with query ranges.
Section: PostgreSQL index types
BRIN index for large append-heavy tables
sql
sql
CREATE INDEX idx_logs_created_at_brin ON logs USING BRIN (created_at);Explanation
BRIN can be compact and effective for very large time-series or append-only tables.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing PostgreSQL index types