Re: How to find the table which is not used in recent 3 month?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Frantz,

You can trace the timestamp by using below query, it shows the list of the table which is not modified or unused since last 3 month.
select relname, NOW()-interval '3 month' from pg_stat_user_tables where n_live_tup=0;

Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com


On Mon, Dec 31, 2018 at 11:59 AM Frantz Song <frantz.song@xxxxxxxxx> wrote:
Dear all,

I'm use postgresql 9.6, it have 800+tables and some of them is not frequently used. 
How to find the table which is not used in recent 3 month? 

Thanks!

--
P Help save trees...please don't print this e-mail unless you really need to.

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux