Re: New SQL counter statistics view (pg_stat_sql)

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New SQL counter statistics view (pg_stat_sql)
Date: 2016-08-22 21:31:36
Message-ID: b34d69a0-860e-7858-a805-5c85e6851a91@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 23/08/16 08:27, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
>> On 2016-08-22 13:54:43 -0400, Robert Haas wrote:
>>> On Sat, Aug 20, 2016 at 11:17 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> I'm inclined to suggest you forget this approach and propose a single
>>>> counter for "SQL commands executed", which avoids all of the above
>>>> definitional problems. People who need more detail than that are
>>>> probably best advised to look to contrib/pg_stat_statements, anyway.
>>> I disagree. I think SQL commands executed, lumping absolutely
>>> everything together, really isn't much use.
>> I'm inclined to agree. I think that's a quite useful stat when looking
>> at an installation one previously didn't have a lot of interaction with.
> Well, let's at least have an "other" category so you can add up the
> counters and get a meaningful total.
>
> regards, tom lane
>
>
Initially I thought of something I thought was factious, but then
realized it might actually be both practicable & useful...

How about 2 extra categories (if appropriate!!!):

1. Things that actually might be sort of as fitting in 2 or more of the
existing categories, or there is an ambiguity as to which category
is appropriate.

2. Things that don't fit into any existing category

This was inspired by a real use case, in a totally unrelated area - but
where I attempted to ensure counts were in the most useful categories I
was able to provide. The user had listed categories, but I found that
the data didn't always fit neatly into them as specified.

Cheers,

Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-08-22 21:33:57 Re: pg_bsd_indent - improvements around offsetof and sizeof
Previous Message Bruce Momjian 2016-08-22 21:20:52 Re: sslmode=require fallback