PostgreSQL

Index bloat wastes disk space and degrades query performance

warning
performanceUpdated Jan 25, 2026
Technologies:
How to detect:

Indexes become bloated over time from updates and deletes, consuming excessive disk space and degrading query performance. Bloated indexes show disproportionately large sizes compared to the underlying table data.

Recommended action:

Check index bloat by querying pg_stat_user_indexes ordered by size. Rebuild bloated indexes with `REINDEX INDEX idx_name;` or `REINDEX TABLE my_table;`. For PostgreSQL 12+, use `REINDEX INDEX CONCURRENTLY idx_name;` to avoid locking. Identify unused indexes (idx_scan = 0, excluding primary keys) and drop them with `DROP INDEX IF EXISTS unused_index_name;` to reclaim space.