Re: Is it possible to keep track of SELECTs? - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Is it possible to keep track of SELECTs?
Date
Msg-id 52713980-BE9D-4A45-8052-862DB6123494@thebuild.com
Whole thread Raw
In response to Is it possible to keep track of SELECTs?  (Dominique Devienne <ddevienne@gmail.com>)
Responses Re: Is it possible to keep track of SELECTs?
List pgsql-general

> On Mar 12, 2024, at 07:15, Dominique Devienne <ddevienne@gmail.com> wrote:
> So is it possible to track the last time a SELECT was performed on some TABLE?

Directly, no.  You could periodically sample the various table-level statistics, and conclude that tables that have had
sometype of scan since the last scan have had a SELECT run against them.  It might not be 100% accurate if (for
example)you reset the statistics or lose them for some other reason, but it might be sufficient for the application. 


pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Is it possible to keep track of SELECTs?
Next
From: Amna Abdul Rehman
Date:
Subject: Postgresql docker health check