Google Professional Cloud Database Engineer

Google Professional Cloud Database Engineer

Get started today

Ultimate access to all questions.


How can you optimize Cloud Spanner for cost efficiency while maintaining performance and high availability when using it as the backend database for an augmented reality game's state storage, player authentication, and in-game reward tracking, given that current costs exceed expectations despite meeting SLA response times?




Explanation:

To address the issue of high costs while maintaining performance and high availability in Cloud Spanner, the recommended practices include using granular instance sizing and Autoscaler (Option D) to automatically adjust the number of nodes based on the current load, thus optimizing costs without manual intervention. Additionally, using interleaving to co-locate parent and child rows (Option B) can improve query performance by reducing the amount of data scanned, which can also contribute to cost savings by minimizing the resources used for queries. Manually scaling down nodes (Option A) is not a scalable or efficient solution, and relying solely on the query optimizer (Option C) does not directly address the cost issue.