Google Cloud Professional Cloud Database Engineer — Question 16
Your application uses Cloud SQL for MySQL. Your users run reports on data that relies on near-real time; however, the additional analytics caused excessive load on the primary database. You created a read replica for the analytics workloads, but now your users are complaining about the lag in data changes and that their reports are still slow. You need to improve the report performance and shorten the lag in data replication without making changes to the current reports. Which two approaches should you implement? (Choose two.)
Answer options
- A. Create secondary indexes on the replica.
- B. Create additional read replicas, and partition your analytics users to use different read replicas.
- C. Disable replication on the read replica, and set the flag for parallel replication on the read replica. Re-enable replication and optimize performance by setting flags on the primary instance.
- D. Disable replication on the primary instance, and set the flag for parallel replication on the primary instance. Re-enable replication and optimize performance by setting flags on the read replica.
- E. Move your analytics workloads to BigQuery, and set up a streaming pipeline to move data and update BigQuery.
Correct answer: B, C
Explanation
Option B is correct as creating additional read replicas and distributing users among them can effectively balance the load, thereby reducing lag. Option C is also a valid approach because enabling parallel replication can significantly enhance the speed of data replication from the primary instance to the read replica. The other options either do not address the issue effectively or suggest disabling replication altogether, which would worsen the situation.