Re: Add min and max execute statement time in pg_stat_statement - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Add min and max execute statement time in pg_stat_statement
Date
Msg-id 5265AF54.1000207@dunslane.net
Whole thread Raw
In response to Re: Add min and max execute statement time in pg_stat_statement  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Add min and max execute statement time in pg_stat_statement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 10/21/2013 04:43 PM, Peter Geoghegan wrote:
> On Mon, Oct 21, 2013 at 1:36 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> Yeah, and I worry about min and max not being very usable - once they
>> get pushed out to extreme values, there's nothing to drag them back
>> toward normality except resetting the stats, and that's not something
>> we want to encourage people to do frequently.
> My thoughts exactly. Perhaps it'd be useful to separately invalidate
> min/max times, without a full reset. But then you've introduced the
> possibility of the average time (total_time/calls) exceeding the max
> or being less than the min.
>
>


This is why I suggested the standard deviation, and why I find it would 
be more useful than just min and max. A couple of outliers will set the 
min and max to
possibly extreme values but hardly perturb the standard deviation over a 
large number of observations.

cheers

andrew



pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: [PoC] pgstattuple2: block sampling to reduce physical read
Next
From: Tom Lane
Date:
Subject: Re: Add min and max execute statement time in pg_stat_statement