Andy Colson wrote: > Oh, I knew I'd seen index usage stats someplace. > > give this a run: > > select * from pg_stat_user_indexes where relname = 'SuperBigTable'; > > http://www.postgresql.org/docs/current/static/monitoring-stats.html > > -Andy > > Scanned by Check Point Total Security Gateway.
Thanks. We have begun analyzing the indexes and indeed found many are pretty useless and will be removed.
A quick word of warning: not all indexes are used for querying, some are used for maintaining constraints and foreign keys. These show up as "useless" in the above query.