Google Professional Cloud Database Engineer Question 162
Select 2Google Cloud PlatformYou are managing a Cloud SQL for PostgreSQL instance that supports a production workload. The database is experiencing high CPU utilization, which is impacting performance during peak hours. At the same time, your organization has a strict budget and wants to minimize costs. What steps should you take to optimize performance while keeping costs under control?
- A
Enable query insights to identify and optimize expensive queries.
- B
Increase the instance size to a larger machine type to handle the workload.
- C
Implement read replicas to offload read operations from the primary instance.
- D
Enable database auto-scaling to dynamically adjust instance size based on workload.
- E
Use storage auto-growth to ensure the database does not run out of storage.
Show answer and explanation
Correct answers: A, C
Explanation
To optimize performance and minimize costs, you should first analyze and optimize expensive queries using query insights. This addresses the root cause of high CPU utilization. Additionally, implementing read replicas can redistribute read-heavy workloads, improving performance without the need for costly instance upgrades. These steps align with the organization's cost constraints while addressing the performance issues effectively.
- A. Correct.
Enabling query insights helps identify poorly optimized queries that may be causing high CPU usage, allowing you to optimize them without incurring additional costs.
- B. Incorrect.
Increasing the instance size can improve performance but will also significantly increase costs, which violates the organization's strict budget requirement.
- C. Correct.
Implementing read replicas can offload read-heavy operations from the primary instance, improving performance without requiring a larger machine type.
- D. Incorrect.
Database auto-scaling is not available for Cloud SQL instances. While it is a valid optimization approach in other services, it is not applicable here.
- E. Incorrect.
Storage auto-growth ensures that your database does not run out of storage, but it does not address CPU utilization or performance issues.