BigQuery Materialized View is very slow when queried, even when just a one-to-one pull from its originating table. Any solutions?
Try manually refreshing the view by running:
CALL BQ.REFRESH_MATERIALIZED_VIEW('project-id.my_dataset.my_mv_table');
to mitigate the issue.
Caution: Do not perform more than one refresh at a time. If you run multiple refreshes concurrently for the same materialized view, then only the first refresh to complete is successful.
To manually refresh materialized views, you need the bigquery.tables.getData, bigquery.tables.update, and bigquery.tables.updateData IAM permissions.
Each of the following predefined IAM roles includes the permissions that you need in order to manually refresh a materialized view: