Improvement of pg_stat_statement usage about buffer hit ratio - Mailing list pgsql-hackers

From KONDO Mitsumasa
Subject Improvement of pg_stat_statement usage about buffer hit ratio
Date
Msg-id 5260EBC2.9000808@lab.ntt.co.jp
Whole thread Raw
Responses Re: Improvement of pg_stat_statement usage about buffer hit ratio  (Haribabu kommi <haribabu.kommi@huawei.com>)
List pgsql-hackers
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.

Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: KONDO Mitsumasa
Date:
Subject: Add min and max execute statement time in pg_stat_statement
Next
From: David Rowley
Date:
Subject: Re: space reserved for WAL record does not match what was written: panic on windows