From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-general@postgresql.org
Subject: [proposal] pg_stat_statements: extension timing instrumentation
Date: Sat, 29 Sep 2018 05:48:42 -0700 (MST)
Message-ID: <1538225322173-0.post@n3.nabble.com> (raw)
Don't you have been surprised by the duration of a query (seen in psql with
\timing)
and the duration for the same query found in pgss ?
It seems that writting the first query text to file takes some time,
that high execution rate on the same query could generate waits on locks
as when pgss is under pressure with too much distinct queries to store
compared
to the max statements allowed.
All those "waits" are co-located in pgss_store function. What about adding a
pgss_time counter
in pgss to measure the duration of pgss_store (a guc could be added to
enable/disable this) ?
Knowing that there are also plans to add a planing counter in PG12, I would
suggest to add
plan_time,
exec_time,
pgss_time
the sum of those 3 counters being total_time.
This could help in investigating write contentions in pg_stat_statements
query file,
helping to define that max queries should be increased, ...
A prototype is available on demand.
Regards
PAscal
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
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: legrand_legrand@hotmail.com
Subject: Re: [proposal] pg_stat_statements: extension timing instrumentation
In-Reply-To: <1538225322173-0.post@n3.nabble.com>
References: <1538225322173-0.post@n3.nabble.com>
* 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