Hi , is there any query to check when a table last accessed
Loading
Hi , is there any query to check when a table last accessed
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Jul 18, 2022, 5:14 AM
Vishal YelvePosted Jul 17, 2022, 5:33 PM
You can do it via checking last modification time of table's file. In postgresql,every table correspond one or more os files,like this:
select relfilenode from pg_class where relname = 'test';
the relfilenode is the file name of table "test".Then you could find the file in the database's directory.