Google Professional Cloud Database Engineer Question 130
Select 4Google Cloud PlatformYour team manages a MySQL database hosted on Google Cloud SQL. Users are reporting slow query performance during peak hours. Upon investigation, you suspect resource contention might be the issue. Which steps should you take to investigate and address the resource contention effectively?
- A
Use the Cloud SQL Query Insights tool to identify queries with high resource consumption.
- B
Adjust the database instance's CPU and memory settings to the lowest tier to reduce costs.
- C
Examine the slow query log to identify queries taking significant time to execute and consuming resources.
- D
Monitor instance-level metrics such as CPU utilization, memory usage, and disk IOPS in the Google Cloud Console.
- E
Disable all database indexes to simplify query execution and reduce contention.
- F
Analyze locks and wait events on the database to identify contention sources.
Show answer and explanation
Correct answers: A, C, D, F
Explanation
Investigating resource contention in a Cloud SQL database requires a systematic approach that includes identifying problematic queries, understanding resource utilization, and analyzing contention sources like locks or waits. Tools like Query Insights and the slow query log are invaluable for identifying high-impact queries, while monitoring instance-level metrics and analyzing database locks help pinpoint resource bottlenecks. Avoid actions like reducing instance resources or disabling indexes, as they would exacerbate performance issues.
- A. Correct.
Using the Cloud SQL Query Insights tool is a best practice for identifying queries with high resource consumption as it provides detailed query performance metrics.
- B. Incorrect.
Adjusting the database instance's CPU and memory to the lowest tier would likely worsen the issue by decreasing available resources, not addressing resource contention.
- C. Correct.
The slow query log is a critical resource for identifying queries that are taking excessive time, which could indicate resource contention.
- D. Correct.
Monitoring instance-level metrics provides insights into whether the database instance is experiencing resource bottlenecks like high CPU, memory, or disk usage.
- E. Incorrect.
Disabling all database indexes would negatively impact performance and is not a recommended approach to address resource contention.
- F. Correct.
Analyzing locks and wait events is an effective way to identify contention sources, such as blocking queries or resource waits.