
Answer-first summary for fast verification
Answer: Establish a materialized view from the query being executed.
**Correct Answer: D. Establish a materialized view from the query being executed.** Creating a materialized view is the optimal solution in this scenario. Materialized views store the results of a query in a separate table, enabling much faster querying than running the original query each time. This method is particularly beneficial for accessing the same data multiple times a day, as it significantly reduces query time and ensures insights are current. **Why the other options are not optimal:** - **A. Run a scheduled query to extract the necessary data at specific intervals daily:** This approach requires executing the query every time data is needed, which is inefficient and time-consuming for large datasets. It does not enhance query performance or deliver insights more promptly. - **B. Utilize a cached query to reduce the time to results:** While caching can improve performance for repeated queries, it's not the most effective solution for tables of several petabytes. Cached results may not reflect the most recent data, leading to potentially outdated insights. - **C. Restrict the query to only the columns needed in the final result:** Although limiting the columns can decrease data transfer and processing time, it doesn't substantially improve query performance for very large tables. This strategy fails to meet the need for quicker query execution and up-to-date insights.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are tasked with accessing data from a massive BigQuery table multiple times each day. The table is several petabytes in size. Your goal is to optimize your queries for faster results and to simplify aggregations for other users. What is the best strategy to improve query speed and ensure timely insights?
A
Run a scheduled query to extract the necessary data at specific intervals daily.
B
Utilize a cached query to reduce the time to results.
C
Restrict the query to only the columns needed in the final result.
D
Establish a materialized view from the query being executed.
No comments yet.