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

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: [survey] New "Stable" QueryId based on normalized query text
Дата
Msg-id CAOBaU_aW0fnF889t-My9pNjOZ2RF7iOGig1TziqZzdtU7g7Xng@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [survey] New "Stable" QueryId based on normalized query text  (Evgeniy Efimkin <efimkin@yandex-team.ru>)
Список pgsql-hackers
On Mon, Aug 12, 2019 at 2:52 PM Evgeniy Efimkin <efimkin@yandex-team.ru> wrote:
>
> Hi!
> What about adding new column in pg_stat_statements e.g. sql_id it's hash from normalized query. Аnd add function
whichget that hash (using raw_parser, raw_expression_tree_walker) for any query 
> `
> postgres=# select get_queryid('select 1');
>  get_queryid
> -------------
>  680388963
> (1 row)

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.

Exposing the queryid computation at SQL level has already been
proposed, and FWIW I'm all for it.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: [survey] New "Stable" QueryId based on normalized query text
Следующее
От: Evgeniy Efimkin
Дата:
Сообщение: Re: [survey] New "Stable" QueryId based on normalized query text