PROFESSIONAL-DATA-ENGINEER practice question 8 of 10
Which of these statements about BigQuery caching is true?
Full set: 401 questionsBigQuery automatically caches the results of queries that have been run previously. When an identical query is submitted again, BigQuery can retrieve the results directly from this temporary cache. This process is significantly faster than re-executing the query. Because no data is processed for a cached query, there is no charge for on-demand analysis when the results are served from the cache. The job statistics will indicate a cacheHit.
A. By default, a query's results are not cached. This is incorrect. Query result caching is an automatic feature and is enabled by default in BigQuery to improve performance and reduce costs.
B. BigQuery caches query results for 48 hours. This is incorrect. BigQuery caches query results for approximately 24 hours, but the cache is a best-effort mechanism and may be invalidated sooner.
C. Query results are cached even if you specify a destination table. This is incorrect. When a query specifies a destination table for its results, the query is always executed, and the cache is not used.
1. Google Cloud Documentation, BigQuery, "Using cached query results":
"When you run a query, BigQuery checks to see if the query results are in the cache... Retrieving results from the cache is much faster than running the query, and there is no charge for cached queries."
"Query results are cached for 24 hours."
Under the "Limitations" section: "You can't use the query cache in the following situations: ... When a destination table is specified."
2. Google Cloud Documentation, BigQuery, "Control costs in BigQuery":
Under the "Avoid running the same query multiple times" section: "BigQuery writes all query results to a table... If you submit the exact same query again, BigQuery will retrieve the results from the cached results table, and you will not be charged for the query."
3. Google Cloud Documentation, BigQuery, "Introduction to BigQuery jobs":
Under the statistics.cacheHit field description: "If true, indicates that the query result was fetched from the query cache." This confirms the mechanism for identifying a cached query.
Keep practicing
Take the free PROFESSIONAL-DATA-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PROFESSIONAL-DATA-ENGINEER practice questions
- Question 1You orchestrate ETL pipelines by using Cloud Composer One of the tasks in the Apache Airf…
- Question 2You want to rebuild your batch pipeline for structured data on Google Cloud You are using…
- Question 3You are designing an Apache Beam pipeline to enrich data from Cloud Pub/Sub with static r…
- Question 4You need to deploy additional dependencies to all of a Cloud Dataproc cluster at startup …
- Question 5A shipping company has live package-tracking data that is sent to an Apache Kafka stream …
- Question 6You use a dataset in BigQuery for analysis. You want to provide third-party companies wit…
