1

Is there a way to get list of Tables that has not been used for specific number of days?

For example of no Query has run against that table for specific number of days?

I wrote this query, but it's not really giving me the output I am expecting:

select relname 
from pg_stat_user_tables 
where (idx_tup_fetch + seq_tup_read)= 0 
order by relname
2
  • What's wrong with the query? How does the result differ from what you expect? – Laurenz Albe Jun 10 at 10:48
  • two of the tables that I am expecting to show doesn't come up in the result, there is no where in my app, that read/write into those 2 tables. – Benjamin Jun 10 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.