| From: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
|---|---|
| To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | New function pg_stat_statements_reset_query() to reset statistics of a specific query |
| Date: | 2018-06-20 07:30:31 |
| Message-ID: | CAJrrPGcyh-gkFswyc6C661K6cknL0XkNqVT0sQt2mFNMR4HRKA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
The pg_stat_statements contains the statistics of the queries that are
cumulative.
I find that any optimizations that are done to improve the performance of a
query
are not be visible clearly until the stats are reset. Currently there is a
function to
reset all the statistics, I find it will be useful if we a function that
resets the stats of
a single query, instead of reseting all the queries.
Attached is a simple patch with implementation. Comments?
Regards,
Haribabu Kommi
Fujitsu Australia
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Function-to-reset-statistics-of-a-specific-statement.patch | application/octet-stream | 9.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2018-06-20 07:42:11 | Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query |
| Previous Message | Pavel Stehule | 2018-06-20 07:21:18 | Re: ToDo: show size of partitioned table |