Re: Improvement of pg_stat_statement usage about buffer hit ratio
От | Haribabu kommi |
---|---|
Тема | Re: Improvement of pg_stat_statement usage about buffer hit ratio |
Дата | |
Msg-id | 8977CB36860C5843884E0A18D8747B0372BED351@szxeml558-mbs.china.huawei.com обсуждение исходный текст |
Ответ на | Improvement of pg_stat_statement usage about buffer hit ratio (KONDO Mitsumasa <kondo.mitsumasa@lab.ntt.co.jp>) |
Ответы |
Re: Improvement of pg_stat_statement usage about buffer
hit ratio
|
Список | pgsql-hackers |
On 18 October 2013 13:35 KONDO Mitsumasa wrote: > Hi, > > I submit improvement of pg_stat_statement usage patch in CF3. > > In pg_stat_statement, I think buffer hit ratio is very important value. > However, it is difficult to calculate it, and it need complicated SQL. > This patch makes it more simple usage and documentation. > > > -bench=# SELECT query, calls, total_time, rows, 100.0 * > shared_blks_hit / > > - nullif(shared_blks_hit + shared_blks_read, 0) AS > hit_percent > > +bench=# SELECT query, calls, total_time, rows, > > +shared_blks_hit_percent > > FROM pg_stat_statements ORDER BY total_time DESC LIMIT 5; > > It will be very simple:-) > > This patch conflicts pg_stat_statement_min_max_exectime patch which I > submitted, and pg_stat_statement_min_max_exectime patch also adds new > columns which are min_time and max_time. So I'd like to change it in > this opportunity. This patch adds another column "shared_blks_hit_percent" to pg_stat_statements view Which is very beneficial to the user to know how much percentage of blks are hit. All changes are fine and working as described. Marked as ready for committer. Regards, Hari babu
В списке pgsql-hackers по дате отправления: