pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Findout long unused tables in database
Date: Tue, 27 Sep 2022 08:35:39 +0200
Message-ID: <bf5d2650-53b4-0908-40ed-2d26024bc712@a-kretschmer.de> (raw)
In-Reply-To: <3d837584-aca0-a8c1-a78b-442071ec723f@andreas.spider-net.de>
References: <3d837584-aca0-a8c1-a78b-442071ec723f@andreas.spider-net.de>



Am 26.09.22 um 14:05 schrieb Andreas Fröde:
> Hello,
> I am looking for a way to find out when a table was last used for 
> reading. (Without writing every statement in the logfile or putting a 
> trigger on it). Is there such a thing?
>

no really what you are looking for, i know, but we have 
pg_stat_user_tables. There can you find how often the table was queried 
in the past. Take the data, wait some time, take it again and compare.



Regards, Andreas

-- 
Andreas Kretschmer
Technical Account Manager (TAM)
www.enterprisedb.com






view thread (6+ messages)  latest in thread

Message-ID: <bf5d2650-53b4-0908-40ed-2d26024bc712@a-kretschmer.de>
Permalink:  ../bf5d2650-53b4-0908-40ed-2d26024bc712@a-kretschmer.de/
Also on:    postgresql.org/message-id/bf5d2650-53b4-0908-40ed-2d26024bc712@a-kretschmer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@a-kretschmer.de
  Subject: Re: Findout long unused tables in database
  In-Reply-To: <bf5d2650-53b4-0908-40ed-2d26024bc712@a-kretschmer.de>
  References: <3d837584-aca0-a8c1-a78b-442071ec723f@andreas.spider-net.de> <bf5d2650-53b4-0908-40ed-2d26024bc712@a-kretschmer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox