Re: pg_stat_statements: can we extend the object names to the qualified names?

From: Sergei Agalakov <sergei(dot)agalakov(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_stat_statements: can we extend the object names to the qualified names?
Date: 2018-11-27 21:30:20
Message-ID: 7878256f-3582-86c1-076d-881d9bd28374@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I like it. I don't want to break backward compatibility.
The new column could be named like query_qn, and will have here the
unambitious text of the query
where all the objects names are extended to the qualified names.

Sergei Agalakov

On 11/27/2018 2:17 PM, Alvaro Herrera wrote:
> 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.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergei Agalakov 2018-11-27 21:47:37 Re: pg_stat_statements: can we extend the object names to the qualified names?
Previous Message Alvaro Herrera 2018-11-27 21:19:55 Re: pg_stat_statements: can we extend the object names to the qualified names?