BigQuery vs Cloud SQL for High-QPS API Serving
You migrated a data backend for an application that serves 10 PB of historical product data for analytics. Only the last known state for a product, which is about 10 GB of data, needs to be served through an API to the other applications. You need to choose a cost-effective persistent storage solution that can accommodate the analytics requirements and the API performance of up to 1000 queries per second (QPS) with less than 1 second latency. What should you do?
Community Votes
71% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests your understanding that BigQuery is optimized for analytics, not transactional API serving, and the trap is assuming materialized views can directly handle high-QPS, low-latency workloads.
When serving petabyte-scale analytics data alongside a high-QPS API, the best practice is to store historical data in BigQuery and the last-known-state data in Cloud SQL. This combination provides cost-effective analytics and sub-second 1000 QPS API performance.
The most common wrong answer is Option A, which uses a BigQuery materialized view to serve the API. Though clever, BigQuery's architecture and API quotas make it unreliable for 1000 QPS with less than 1 second latency, unlike a purpose-built transactional store like Cloud SQL.
Community Discussion (12 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option D correctly separates the two distinct workloads: BigQuery for the 10 PB historical analytics and Cloud SQL for the 10 GB last-known-state data. BigQuery is a serverless data warehouse designed for petabyte-scale analytical queries, offering cost-effective on-demand storage. Cloud SQL, a fully managed relational database, is optimized for transactional workloads and can easily handle 1000 QPS with sub-second latency for a small dataset (10 GB).The architecture works by storing historical changes in BigQuery and maintaining a current-state table in Cloud SQL that is updated after each product change. This keeps the API access pattern simple and performant, while still allowing deep analytics on the full history.
Why the Other Options Are Wrong
Option A is tempting because it avoids adding another database, but BigQuery is not designed for point lookups or high-concurrency transactional access. BigQuery's API quotas and typical query latency (even with materialized views) make it difficult to consistently meet 1000 QPS with <1 second latency, as noted in comment [6]. Materialized views are for precomputation, not for serving as an operational datastore.Option B (Firestore) would not handle the 10 PB analytics requirement well, and storing all historical changes in Firestore documents is costly and inefficient. Option C (Cloud SQL for analytics) is inappropriate because Cloud SQL is not built for petabyte-scale analytical workloads, both in terms of cost and performance.
Community Comment Notes
Several comments correctly point out that BigQuery should be used only for analytics, while Cloud SQL should handle the API. Comment [2] provides the exact architecture for Option D, and comment [10] explains why Cloud SQL handles high-QPS transactional workloads effectively. Comment [6] even references BigQuery's API request quotas, including the 1000 req/s table-data-list limit, emphasizing that other methods like queries have lower limits. Comments supporting Option A (materialized views) miss that BigQuery's latency and quota characteristics are not suitable for a sustained 1000 QPS operational API.Official Reference
Exam Strategy
When facing questions that mix analytics and high-QPS transactional serving, remember to separate the stores: use data warehouses like BigQuery for analytics and dedicated transactional databases like Cloud SQL for API serving. Look for clues about latency, QPS, and data size—Cloud SQL is the typical answer for sub-second, high-concurrency point lookups.