From: | Seino Yuki <seinoyu(at)oss(dot)nttdata(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Add statistics refresh materialized view |
Date: | 2021-07-08 16:39:54 |
Message-ID: | 6fe02a8ab3b2b0801933b9cabfab62cf@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi.
This is a proposal for a new feature in statistics collector.
I think we need to add statistics about refresh matview to
pg_stat_all_tables view.
When the "REFRESH MATERIALIZED VIEW" was executed, the number of times
it was executed
and date it took were not recorded anywhere.
"pg_stat_statements" can be used to get the number of executions and the
date and time of execution,
but this information is statement-based, not view-based.
Also, that method requires the high cost of "pg_stat_statements".
This patch will add statistics(count, last time) about "REFRESH
MATERIALIZED VIEW"
to pg_stat_all_tables(pg_stat_user_tables, [pg_stat_sys_tables]).
What do you think?
Regards,
Seino Yuki
Attachment | Content-Type | Size |
---|---|---|
add_statistics_refresh_matview_v1.patch | text/x-diff | 11.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2021-07-08 16:51:45 | enable_resultcache confusion |
Previous Message | Dagfinn Ilmari Mannsåker | 2021-07-08 16:23:51 | Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node() |