Courseiva
Monitor and optimize database performanceeasyMultiple ChoiceObjective-mapped

PCDE Monitor and optimize database performance Practice Question

A developer has deployed a new version of an application that uses Cloud SQL. After the deployment, you notice a sharp increase in the number of slow queries. What should you do first to identify the problematic queries?

⚠ Common exam trap

Google Cloud often tests the distinction between reactive scaling (Option C) and proactive diagnostics (Option B), trapping candidates who think adding resources is the first troubleshooting step instead of identifying the root cause.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Cloud SQL Query Insights to identify the queries with the highest latency and examine their execution plans.

Cloud SQL Query Insights is the recommended first step for diagnosing slow queries because it provides built-in query monitoring, latency breakdowns, and execution plans without additional configuration. It directly surfaces the queries with the highest latency, allowing you to examine their execution plans to identify root causes such as missing indexes or inefficient joins.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Check the slow query log in Cloud Logging and look for queries with high rows_examined.

    Why it's wrong here

    While Cloud SQL slow query logs do capture queries with high `rows_examined`, they are not enabled by default and require the `log_slow_queries` flag to be set before deployment. In this scenario, the developer has just deployed a new version, so the flag may not be active, meaning no slow queries are logged. This option is tempting because slow query logs are a standard tool for identifying performance bottlenecks in production, and they would be correct if the flag had been pre-configured and the logs were actively capturing data.

  • Use Cloud SQL Query Insights to identify the queries with the highest latency and examine their execution plans.

    Why this is correct

    Query Insights provides detailed query performance data without additional overhead.

  • Increase the instance tier to reduce the impact of slow queries.

    Why it's wrong here

    Scaling up without diagnosis may mask the problem and increase costs.

  • Enable the general query log and parse the log file to find slow queries.

    Why it's wrong here

    Enabling general query log can degrade performance and is not the most efficient diagnostic approach.

About these practice questions

Courseiva writes every PCDE question from scratch — 1,446 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.