Add statistics refresh materialized view - Mailing list pgsql-hackers

From Seino Yuki
Subject Add statistics refresh materialized view
Date
Msg-id 6fe02a8ab3b2b0801933b9cabfab62cf@oss.nttdata.com
Whole thread Raw
Responses Re: Add statistics refresh materialized view
List 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

pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()
Next
From: Bruce Momjian
Date:
Subject: enable_resultcache confusion