Your team runs a complex analytical query daily that processes terabytes of data. Recently, after running for 20 minutes, the query fails with a "Resources exceeded” error. You need to resolve this issue.
What should you do?
A. Increase your project's BigQuery API request quota.
B. Increase the maximum table size limit.
C. Analyze the SQL syntax for errors.
D. Move from BigQuery on-demand to slot reservations.
Explanation:
Comprehensive and Detailed The error message "Resources exceeded" in BigQuery indicates that the query's execution plan is too complex or requires more computational resources (slots) than are available to it in the on-demand, fair-share pool.
Option D is the correct answer. BigQuery's on-demand pricing model uses a massive, shared pool of processing units called slots. While this pool is large, a single query cannot monopolize it, and there are limits to prevent runaway jobs. For consistently complex, high-resource queries, the solution is to switch to capacity-based pricing by purchasing slot reservations (e.g., using BigQuery editions). This provides your project with a dedicated, guaranteed amount of processing capacity, ensuring your complex queries have the resources they need to complete successfully.
Option A is incorrect because API request quotas relate to the number of API calls (e.g., how many jobs you can submit per minute), not the computational resources allocated to a single running query.
Option B is incorrect because table size limits are not related to query execution resources.
Option C is incorrect because while a syntax error would cause a query to fail, it would do so immediately with a syntax error message, not after 20 minutes with a "Resources exceeded" error. While optimizing the query is a good practice, the most direct way to solve a resource limit issue is to provide more resources.
Reference (Google Cloud Documentation Concepts): The Google Cloud documentation on "BigQuery pricing" explains the two main models: on-demand pricing and capacity-based pricing (editions). The "Resources exceeded" error is a known limitation of the on-demand model for extremely demanding queries. The documentation on "Introduction to slots" and "Reservations" explicitly presents purchasing dedicated slots as the solution for gaining more predictable and higher query performance for demanding workloads.