Google Professional Cloud Database Engineer Question 129
Select 3Google Cloud PlatformYour e-commerce application is experiencing slow database performance during peak hours. You suspect resource contention in your Cloud SQL instance running a PostgreSQL database. Which actions should you take to investigate and identify the root cause of the contention?
- A
Use the Query Insights feature in Cloud SQL to analyze query performance and identify slow-running queries.
- B
Enable high availability (HA) on the Cloud SQL instance to distribute the workload across multiple zones.
- C
Monitor CPU and memory utilization using the Cloud Monitoring metrics for the Cloud SQL instance.
- D
Check the database logs to identify deadlocks or lock wait events.
- E
Increase the instance size to provide more resources to the database.
Show answer and explanation
Correct answers: A, C, D
Explanation
To investigate database resource contention in a Cloud SQL instance, it is important to leverage diagnostic tools like Query Insights, monitor system metrics to understand resource usage, and analyze database logs for issues like deadlocks and lock waits. These actions help pinpoint the root cause of the contention. Simply increasing the instance size or enabling high availability are not investigation steps and do not address the underlying issue.
- A. Correct.
This is correct. Query Insights in Cloud SQL provides detailed analysis of query performance, which can help identify slow queries causing resource contention.
- B. Incorrect.
This is incorrect. Enabling high availability ensures failover and availability in case of instance failure, but it does not address resource contention directly.
- C. Correct.
This is correct. Monitoring CPU and memory utilization can help identify whether the database instance is under resource pressure, which is a key factor in contention issues.
- D. Correct.
This is correct. Database logs can reveal information about deadlocks or long lock wait events, which are common causes of resource contention.
- E. Incorrect.
This is incorrect. While increasing the instance size may alleviate resource contention temporarily, it is not an investigation step to identify the root cause of the contention.