Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Data Engineer Exam - Topic 5 Question 126 Discussion

Your company uses Looker Studio connected to BigQuery for reporting. Users are experiencing slow dashboard load times due to complex queries on a large table. The queries involve aggregations and filtering on several columns. You need to optimize query performance to decrease the dashboard load times. What should you do?
B) Create a materialized view in BigQuery that pre-calculates the aggregations and filters used in the Looker Studio dashboards.
A) Configure Looker Studio to use a shorter data refresh interval to ensure fresh data is always displayed.
C) Implement row-level security in BigQuery to restrict data access and reduce the amount of data processed by the queries.
D) Use BigQuery BI Engine to accelerate query performance by caching frequently accessed data.

Google Professional Data Engineer Exam - Topic 5 Question 126 Discussion

Actual exam question for Google's Professional Data Engineer exam
Question #: 126
Topic #: 5
[All Professional Data Engineer Questions]

Your company uses Looker Studio connected to BigQuery for reporting. Users are experiencing slow dashboard load times due to complex queries on a large table. The queries involve aggregations and filtering on several columns. You need to optimize query performance to decrease the dashboard load times. What should you do?

Show Suggested Answer Hide Answer
Suggested Answer: B

The scenario describes slow performance caused by complex queries with aggregations and filtering on a large table. The best way to optimize this type of workload in BigQuery for dashboarding is to pre-compute the needed data.

Materialized Views (MVs) are pre-computed views that cache the results of a query, including aggregations and filters. When a dashboard's query matches the MV's query (or a part of it), BigQuery can use the cached results, which is much faster than running the original complex query against the large raw table, directly improving dashboard load times. They are designed to improve performance and reduce costs for repeating, complex queries.

Correcting other options:

A (Shorter Refresh Interval): This would make the problem worse by triggering the slow, complex queries more frequently.

C (Row-Level Security): This is a security measure, not primarily a performance optimization. While it might slightly reduce the data scanned per user if the table is partitioned on the access column, it doesn't fundamentally speed up the complex aggregation and filtering logic which is the core problem.

D (BigQuery BI Engine): BI Engine is an in-memory analysis service for BigQuery that accelerates many SQL queries, and it is a good general option for BI. However, creating a Materialized View specifically pre-calculates the exact aggregations and filters needed for the slow dashboard, which provides a more targeted and often more dramatic performance improvement for known, complex, and recurring queries than a general-purpose caching service. The combination of MVs and BI Engine is a best practice, but the MV is the most targeted fix for pre-calculating the complex aggregations.


'In BigQuery, materialized views are pre-computed views that cache a query's results, enhancing performance and efficiency... They periodically refresh to capture changes from the underlying base tables, allowing BigQuery to read only the updated data. Materialized views improve query performance by storing precomputed results, which reduces the need to process raw data repeatedly. This caching mechanism speeds up retrieval times, especially for complex queries.' (3Source: Optimizing Query Performance with BigQuery Materialized Views)

'Smart tuning: BigQuery automatically rewrites queries to use materialized views whenever possible. Automatic rewriting improves query performance and reduces costs without changing query results.' (Source: Use materialized views)

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel