From: Julien Rouhaud <rjuju123@gmail.com>
To: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Dirschel, Steve <steve.dirschel@thomsonreuters.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg_stat_statements
Date: Wed, 12 Jan 2022 18:31:41 +0800
Message-ID: <20220112103141.qf6dfobqbeezz5ls@jrouhaud> (raw)
In-Reply-To: <CANbhV-GQTFnCZHbReR6S6wVxnqg3VEC6r5kDMtXhfU4wE5vWyg@mail.gmail.com>
References: <DM6PR03MB43324F8A19B1EAE0BCAD7397FA519@DM6PR03MB4332.namprd03.prod.outlook.com>
<20220112030315.vx3lkrvhjanxel7u@jrouhaud>
<CANbhV-GQTFnCZHbReR6S6wVxnqg3VEC6r5kDMtXhfU4wE5vWyg@mail.gmail.com>
On Wed, Jan 12, 2022 at 10:22:38AM +0000, Simon Riggs wrote:
> On Wed, 12 Jan 2022 at 03:03, Julien Rouhaud <rjuju123@gmail.com> wrote:
> >
> > Unfortunately this is a known limitation.
>
> I see this as a beneficial feature.
>
> If the same SQL is executed against different sets of tables, each
> with different indexes, probably different data, the performance could
> vary dramatically and might need different tuning on each. So having
> separate rows in the pg_stat_statements output makes sense.
Yes, having different rows seems like a good thing. But being unable to tell
which row apply to which schema is *not* a good thing.
> > There were some previous discussions (e.g. [1] and [2] more recently), but I
> > don't think there was a real consensus on how to solve that problem.
>
> To differentiate, run each schema using a different user, so you can
> tell them apart.
This isn't always possible. For instance, once you reach enough schema it will
be problematic to do proper pooling.
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: rjuju123@gmail.com, simon.riggs@enterprisedb.com, steve.dirschel@thomsonreuters.com
Subject: Re: pg_stat_statements
In-Reply-To: <20220112103141.qf6dfobqbeezz5ls@jrouhaud>
References: <DM6PR03MB43324F8A19B1EAE0BCAD7397FA519@DM6PR03MB4332.namprd03.prod.outlook.com> <20220112030315.vx3lkrvhjanxel7u@jrouhaud> <CANbhV-GQTFnCZHbReR6S6wVxnqg3VEC6r5kDMtXhfU4wE5vWyg@mail.gmail.com> <20220112103141.qf6dfobqbeezz5ls@jrouhaud>
* 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