Re: New SQL counter statistics view (pg_stat_sql)

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: New SQL counter statistics view (pg_stat_sql)
Дата
Msg-id CAJrrPGeZALSp+p4C-kDoiQOTgS=hUstqO_PtiX9VbEJ=9Y_kCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: New SQL counter statistics view (pg_stat_sql)  (vinayak <Pokale_Vinayak_q3@lab.ntt.co.jp>)
Список pgsql-hackers


On Wed, Oct 12, 2016 at 4:06 PM, vinayak <Pokale_Vinayak_q3@lab.ntt.co.jp> wrote:

Thank you for the patch.

Test: Commands with uppercase and lowercase
====
If the tag='select' then it returns the 0 rows but count is actually increment by 1.

tag='select' vs tag='SELECT'

postgres=# SET track_sql TO ON;
SET
postgres=# SELECT * FROM pg_stat_sql where tag='SELECT';
  tag   | count
--------+-------
 SELECT |    12
(1 row)

postgres=# SELECT * FROM pg_stat_sql where tag='SELECT';
  tag   | count
--------+-------
 SELECT |    13
(1 row)

postgres=# SELECT * FROM pg_stat_sql where tag='select';
 tag | count
-----+-------
(0 rows)

postgres=# SELECT * FROM pg_stat_sql where tag='SELECT';
  tag   | count
--------+-------
 SELECT |    15
(1 row)

I think all command works same as above.

Thanks for checking the patch.

Yes, that's correct. Currently the CAPS letters are used as tag names
that are getting displayed whenever any SQL command is executed.
So I used the same names as entries to store the details of stats of
SQL statements.

If anyone feels the other way is better, I am fine for it.


Regards,
Hari Babu
Fujitsu Australia

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

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Steps inside ExecEndGather
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Re: New SQL counter statistics view (pg_stat_sql)