Re: Include a timestamp in future versions of pg_stat_statements when when a query entered the cache?

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Jerry Brenner <jbrenner(at)guidewire(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Include a timestamp in future versions of pg_stat_statements when when a query entered the cache?
Date: 2023-12-06 06:45:07
Message-ID: ZXAYc2UV5vdUTADo@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

On Tue, Dec 05, 2023 at 06:28:54AM -0800, Jerry Brenner wrote:
> It would be helpful if a timestamp column was added to pg_stat_statements
> to denote when a query entered the view. This would make it easier to tell
> how frequently a query is being executed (100,000 times since a specific
> timestamp vs 100,000 times since the execution stats were last reset.)

This was actually done a few weeks ago, and will be available with pg 17. You
can see the 2 new timestamp counters (one for the whole record, one for the
minmax counters only) documentation at
https://www.postgresql.org/docs/devel/pgstatstatements.html

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jerry Brenner 2023-12-08 23:09:52 Question about semantics of $ variables in json explain plans in 13
Previous Message Jerry Brenner 2023-12-05 14:28:54 Include a timestamp in future versions of pg_stat_statements when when a query entered the cache?