Question
How do I show all queries involving materialized views in the last 60m?Answer
This query will display all queries directed towards Materialized Views considering that:- we can leverage the
create_table_queryfield insystem.tablestable to identify what tables are explicit (TO) recipient of MVs; - we can track back (using
uuidand the name convention.inner_id.<uuid>) what tables are implicit recipient of MVs;
60 m by default) in the initial query CTE
default.big_changes_mv and default.sum_of_volumes_mv are both materialized views.