PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #50
You are the primary DBA of a Cloud SQL for PostgreSQL database that supports 6 enterprise applications in production. You used Cloud SQL Insights to identify inefficient queries and now need to…
The correct answer is D. Use query tags to add application-centric database monitoring. Query tags allow applications to embed metadata (such as application name, team, or version) directly into SQL statements as structured comments (e.g., using the sqlcommenter format). Cloud SQL Insights can then surface this metadata, enabling you to filter and attribute…
Question
You are the primary DBA of a Cloud SQL for PostgreSQL database that supports 6 enterprise applications in production. You used Cloud SQL Insights to identify inefficient queries and now need to identify the application that is originating the inefficient queries. You want to follow Google-recommended practices. What should you do?
Options
- AShut down and restart each application.
- BWrite a utility to scan database query logs.
- CWrite a utility to scan application logs.
- DUse query tags to add application-centric database monitoring.
How the community answered
(28 responses)- A11% (3)
- B4% (1)
- C14% (4)
- D71% (20)
Explanation
Query tags allow applications to embed metadata (such as application name, team, or version) directly into SQL statements as structured comments (e.g., using the sqlcommenter format). Cloud SQL Insights can then surface this metadata, enabling you to filter and attribute inefficient queries to a specific application without any manual log scanning. This is the Google-recommended approach for application-centric database observability. Option A (shutting down and restarting each application) is disruptive to production and is not a diagnostic technique. Option B (scanning database query logs) and Option C (scanning application logs) are manual, time-consuming, and error-prone approaches that Google-recommended tooling is designed to replace.
Topics
Community Discussion
No community discussion yet for this question.