refreshing query id for pg_stat_statements based on comment in sql

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема refreshing query id for pg_stat_statements based on comment in sql
Дата
Msg-id CALNJ-vSijzziYNRD3HTY72Uh+sHSYr5DbfqBKzSvysSvqs9UtQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: refreshing query id for pg_stat_statements based on comment in sql  (Bruce Momjian <bruce@momjian.us>)
Re: refreshing query id for pg_stat_statements based on comment in sql  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
Hi,
Currently the query id for pg_stat_statements gets calculated based on the parse nodes specifics. 
This means that the user cannot add a comment to a SQL query to test something. (though some other RDBMS allows this practice).

Consider this use case: for query q, admin looks at stats and performs some optimization (without changing the query). Admin adds / modifies the comment for q - now the query becomes q'. If query id doesn't change, there still would be one row in pg_stat_statements which makes it difficult to gauge the effectiveness of the tuning.

I want to get opinion from the community whether adding / changing comment in SQL query should result in new query id for pg_stat_statements.

Cheers

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [PATCH] minor reloption regression tests improvement
Следующее
От: Nikolay Shaplov
Дата:
Сообщение: Re: [PATCH] minor reloption regression tests improvement