pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Sergei Agalakov <sergei.agalakov@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_stat_statements: can we extend the object names to the qualified names?
Date: Tue, 27 Nov 2018 18:17:21 -0300
Message-ID: <20181127211721.4keykfxn66mcipdo@alvherre.pgsql> (raw)
In-Reply-To: <372d75cc-053b-1a07-948f-089408d3cd3a@gmail.com>

On 2018-Nov-27, Sergei Agalakov wrote:

> We do see that the queries are different but we can't see why they are so
> much different in the execution time.
> If the pg_stat_statements module would extend the object name to the
> qualified names like s1.t1 and s2.t2 then we would see the report as
> 3004391594 select count(*) from s1.t1
> 1336375111 select count(*) from s2.t1
> with an immediate understanding of what's going on.

I think this is hard to do in a really useful manner -- if we qualify
all names in the query, it becomes mangled to the point that it's no
longer easily recognizable (users want to "grep" their applications to
see where the queries are).  Maybe we can have a second column that
shows the query with all object names schema-qualified, keeping the
original one that uses the query as entered by the user.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (6+ messages)  latest in thread

Message-ID: <20181127211721.4keykfxn66mcipdo@alvherre.pgsql>
Permalink:  ../20181127211721.4keykfxn66mcipdo@alvherre.pgsql/
Also on:    postgresql.org/message-id/20181127211721.4keykfxn66mcipdo@alvherre.pgsql

 · 

reply

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: alvherre@2ndquadrant.com, sergei.agalakov@gmail.com
  Subject: Re: pg_stat_statements: can we extend the object names to the qualified names?
  In-Reply-To: <20181127211721.4keykfxn66mcipdo@alvherre.pgsql>
  References: <372d75cc-053b-1a07-948f-089408d3cd3a@gmail.com> <20181127211721.4keykfxn66mcipdo@alvherre.pgsql>

* 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