Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Materialized View is slow

BigQuery Materialized View is very slow when queried, even when just a one-to-one pull from its originating table. Any solutions?

0 1 501
1 REPLY 1

osvaldolopez
Former Googler

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:

  • bigquery.dataEditor
  • bigquery.dataOwner
  • bigquery.admin