From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Andrei Zubkov <zubkov(at)moonset(dot)ru> |
Cc: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements |
Date: | 2021-03-23 07:03:25 |
Message-ID: | 20210323070325.n6hgjonavdwlm5al@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 23, 2021 at 09:50:16AM +0300, Andrei Zubkov wrote:
>
> By the way right now in my workload tracing tool pg_profile I have to
> reset pg_stat_statements on every sample (wich is about 30-60 minutes)
> to make sure that all workload between samples is captured. This causes
> much more overhead. Introduced first_seen column can eliminate the need
> of resets.
Note that you could also detect entries for which some counters decreased (e.g.
the execution count), and in that case only use the current values. It should
give the exact same results as what you will get with the first_seen column,
except of course if some entry is almost never used and is suddenly used a lot
after an explicit reset or an eviction and only until you perform your
snapshot. I'm not sure that it's a very likely scenario though.
FTR that's how powa currently deals with reset/eviction.
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2021-03-23 07:10:58 | Re: About to add WAL write/fsync statistics to pg_stat_wal view |
Previous Message | Masahiko Sawada | 2021-03-23 06:54:48 | Re: New IndexAM API controlling index vacuum strategies |