
Answer-first summary for fast verification
Answer: Use query tags to add application-centric database monitoring.
To identify the application originating inefficient queries in a Cloud SQL for PostgreSQL database following Google-recommended practices, the best approach is to use query tags. Query tags allow you to add application-specific metadata to your SQL queries, which can then be used to monitor and analyze query performance per application. This method is non-intrusive, does not require shutting down applications (option A), and is more efficient than writing utilities to scan logs (options B and C), which can be time-consuming and less accurate. Query tags are a built-in feature designed for this exact purpose, making option D the correct choice.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can you determine which of the 6 enterprise applications is generating the inefficient queries identified by Cloud SQL Insights in your Cloud SQL for PostgreSQL database, following Google's best practices?
A
Shut down and restart each application.
B
Write a utility to scan database query logs.
C
Write a utility to scan application logs.
D
Use query tags to add application-centric database monitoring.
No comments yet.