August 31st, 2012, 08:21 AM
tracking indexes and analyzing the tables on which index add, we encounter some situations
some of our tables, have index, but, when I execute query with clause where on index field, doesn't account in your idx_scan field respective. Same relname and schemaname, so, I couldn't be wrong.
Testing more, I deleted and create the table again, after that the query returned to account the idx_scan.
That occurred with another tables to, we executed some queries with indexes and didn't account idx_scan field, only in seq_scan and even I create another field in the same table with index, this new field doesn't count idx_scan.
Whats the problem with these tables? What we does wrong? Only if I create a new table with indexes that account in idx_scan, just in an old table that has wrong.
We did migration sometimes with this database, maybe it can be the problem? Happened on localhost and server online.
another event that we saw, some indexes were accounted, idx_scan > 0, and when execute query select, does not increase idx_scan again, the number was fixed and just increase seq_scan.
I believe those problems can be related.
I appreciate some help, is a big mystery prowling our DB and haven't any idea what can be