How to minimize Cloud SQL load for BigQuery analytics?
You have terabytes of customer behavioral data streaming from Google Analytics into BigQuery daily. Your customers’ information, such as their preferences, is hosted on a Cloud SQL for MySQL database. Your CRM database is hosted on a Cloud SQL for PostgreSQL instance. The marketing team wants to use your customers’ information from the two databases and the customer behavioral data to create marketing campaigns for yearly active customers. You need to ensure that the marketing team can run the campaigns over 100 times a day on typical days and up to 300 during sales. At the same time, you want to keep the load on the Cloud SQL databases to a minimum. What should you do?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests the ability to offload analytical query workloads from operational databases (Cloud SQL) to analytical warehouses (BigQuery) using replication services like Datastream, avoiding the trap of using federated queries which increase load on the source.
To minimize load on Cloud SQL databases while frequently joining data with BigQuery, use Datastream to replicate the SQL data into BigQuery. This allows the marketing team to run high-frequency analytical queries directly within BigQuery without impacting the performance of the transactional databases.
Choosing Option A (BigQuery federated queries) is a common mistake because it allows querying without moving data, but it fails the requirement to minimize load on Cloud SQL as each query hits the source database directly.
Community Discussion (8 comments)
- Datastream: It's a fully managed, serverless service for real-time data replication. It allows to stream data from various sources, including Cloud SQL, into BigQuery. - Reduced Load on Cloud SQL: By replicating the required tables from both Cloud SQL databases into BigQuery, you minimize the load on the Cloud SQL instances. The marketing team's queries will be run against BigQuery, which is designed to handle high-volume analytics workloads. - Frequency of Queries: BigQuery can easily handle the high frequency of queries (100 times daily, up to 300 during sales events) due to its powerful data processing capabilities. - Combining Data Sources: Once the data is in BigQuery, you can efficiently combine it with the Google Analytics data for comprehensive analysis and campaign planning.
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is correct because Google Datastream enables change data capture (CDC) to replicate data from Cloud SQL (MySQL and PostgreSQL) into BigQuery in near real-time. Once the data resides in BigQuery, the marketing team can run up to 300 analytical queries per day against the combined dataset (Analytics + SQL data) entirely within BigQuery. This approach completely isolates the heavy analytical workload from the transactional Cloud SQL instances, ensuring minimal load and high performance.Why the Other Options Are Wrong
Option A is incorrect because BigQuery federated queries execute the query portion against the external Cloud SQL database for every run. Running this 100-300 times a day would place significant read load on the transactional databases, violating the requirement to keep load to a minimum. Options B and D are incorrect because using Dataproc (Serverless or Cluster) to query Cloud SQL directly still requires connecting to the source databases for each job, incurring similar load and complexity without the benefits of BigQuery's native performance for this specific use case.Community Comment Notes
The community strongly supports Option C, noting that Datastream is a fully managed service designed for this specific integration scenario. Several users initially considered Option A but switched to C upon realizing that federated queries are slower and shift processing burden to the source database. Commenters highlighted that while read replicas could help with federated queries, replication to BigQuery is the superior architectural pattern for high-frequency analytics.Official Reference
Exam Strategy
When questions ask to 'minimize load' on a transactional database (Cloud SQL) while performing analytics in BigQuery, look for data replication (Datastream) rather than direct querying (Federated Query).