Re: [survey] New "Stable" QueryId based on normalized query text

From: Evgeniy Efimkin <efimkin(at)yandex-team(dot)ru>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: legrand legrand <legrand_legrand(at)hotmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [survey] New "Stable" QueryId based on normalized query text
Date: 2019-08-12 14:01:46
Message-ID: 3020141565618496@vla1-9d3c37294942.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> One problem with pg_stat_statement's normalized query is that it's not
> stable, it's storing the normalized version of the first query string
> passed when an entry is created. So you could have different strings
> depending on whether the query was fully qualified or relying on
> search path for instance.
I think normalized query stored in pg_stat_statement it's not very important.
it might look something like that
`
query | calls | queryid | sql_id
-----------------------+-------+------------+------------
Select * from t | 4 | 762359559 | 680388963
select * from t | 7 | 3438533065 | 680388963
select * from test2.t | 1 | 230362373 | 680388963
`
we can cut schema name in sql normalization
algorithm
--------
Efimkin Evgeny

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2019-08-12 14:15:31 Re: [survey] New "Stable" QueryId based on normalized query text
Previous Message Julien Rouhaud 2019-08-12 13:02:00 Re: [survey] New "Stable" QueryId based on normalized query text