Re: Add min and max execute statement time in pg_stat_statement

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Geoghegan <pg(at)heroku(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add min and max execute statement time in pg_stat_statement
Date: 2013-10-23 20:17:53
Message-ID: 20131023201753.GP2706@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Jeff Janes (jeff(dot)janes(at)gmail(dot)com) wrote:
> On Wed, Oct 23, 2013 at 9:20 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > * Josh Berkus (josh(at)agliodbs(dot)com) wrote:
> > > On the other hand, it's still true that a high STDDEV indicates a high
> > > variance in the response times of a particular query, whereas a low one
> > > indicates that most are close to the average. While precision math
> > > might not work if we don't have the correct distribution, for gross DBA
> > > checks it's still useful. That is, I can answer the question in many
> > > cases of: "Does this query have a high average because of outliers, or
> > > because it's consisently slow?" by looking at the STDDEV.
> >
> > The concern is actually the reverse issue- often the question is "is
> > this query ever really slow?", or "when is this query really slow?" and
> > those questions are not answered by stddev, min, max, nor avg.
>
> How does max not answer "is this query ever really slow?"?

meh. max can end up being high for about a bazillion reasons and it'd
be difficult to really get any understanding of how or why it happened
from just that information.

> But good point,
> if we have a max, then I think a time-stamp for when that max was obtained
> would also be very useful.

And now we're getting into exactly what I was trying to suggest
up-thread: outlier detection and increased logging when a rare event
occurs..

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2013-10-23 20:20:58 Re: missing locking in at least INSERT INTO view WITH CHECK
Previous Message Andres Freund 2013-10-23 20:08:21 Re: missing locking in at least INSERT INTO view WITH CHECK