Index Maintenance
Find Unused PostgreSQL Indexes with pg_stat_all_indexes
Apr 10, 2024 / · 7 min read · postgresql performance indexing index maintenance pg_stat_all_indexes pg_index pg_stat_database ·Find Unused PostgreSQL Indexes Before They Cost You Which indexes have gone unused since the statistics were last reset? pg_stat_all_indexes counts every index scan per index, and an index whose idx_scan is still zero after weeks of normal traffic is a candidate to drop. The query below lists those indexes, largest …
Read More