Google Professional Cloud Database Engineer Question 109
Select 3Google Cloud PlatformYou are managing a Cloud SQL instance running PostgreSQL for your company's e-commerce platform. The platform has experienced intermittent performance degradation, and your team needs to monitor and troubleshoot the issue. Which of the following actions should you take to effectively configure monitoring and troubleshoot the database?
- A
Enable Query Insights to monitor slow-running queries and analyze query performance.
- B
Configure custom alerts in Cloud Monitoring for high CPU and memory usage thresholds.
- C
Enable binary logging to track all DML operations for debugging query issues.
- D
Use the Cloud SQL Insights dashboard to identify queries causing high lock contention.
- E
Modify the pg_hba.conf file to allow unrestricted access for troubleshooting purposes.
Show answer and explanation
Correct answers: A, B, D
Explanation
To effectively monitor and troubleshoot a Cloud SQL database, you should use tools and features designed for query analysis (like Query Insights and Cloud SQL Insights) and resource monitoring (like Cloud Monitoring custom alerts). Binary logging is not relevant for performance debugging, and opening up unrestricted access to the database is a major security risk. Combining query performance tools and resource monitoring ensures a comprehensive approach to identifying and resolving performance issues.
- A. Correct.
Enabling Query Insights is a recommended practice for identifying and analyzing slow or inefficient queries in Cloud SQL. It helps in pinpointing performance bottlenecks caused by specific queries.
- B. Correct.
Configuring custom alerts in Cloud Monitoring allows you to proactively track resources like CPU and memory usage. This is crucial for identifying resource-related performance issues.
- C. Incorrect.
Binary logging is primarily used for replication and point-in-time recovery. It is not intended for query performance debugging or monitoring purposes.
- D. Correct.
The Cloud SQL Insights dashboard provides detailed query-level statistics, including lock contention metrics, which are useful for identifying performance bottlenecks.
- E. Incorrect.
Modifying the pg_hba.conf file for unrestricted access is a security risk and not recommended, even during troubleshooting. Instead, use IAM and proper access controls.