I have a large PostgeSQL 9.1 database in production use. I want to free up some disk space. There is a large index, and I'm unsure if it's being used.
select * from pg_stat_all_indexes where indexrelname = 'myindexname';
relid | indexrelid | schemaname | relname | indexrelname | idx_scan | idx_tup_read | idx_tup_fetch
-------+------------+------------+-----------------+-----------------------+----------+--------------+---------------
20625 | 19563303 | public | mytablename | myindexname | 575598 | 281635 | 0
(1 row)
Is this index being used? idx_tup_fetch
is 0. Does that mean it's not being used? Can I drop the index without affecting any reads/queries?
This database is in production, real world use. This index was recently rebuilt, and there has been real world use since. If it hasn't been used since then, it will never be.
The index is about 130G and the table 50G.