Courseiva
mediumMultiple ChoiceObjective-mapped

PCD Practice Question: An application running on GKE is experiencing…

An application running on GKE is experiencing high latency. The team uses Cloud Trace to identify the bottleneck. They notice that a particular service spends most of its time waiting on a database query. How can they optimize performance?

⚠ Common exam trap

Google Cloud often tests the misconception that scaling horizontally (adding replicas) solves all performance issues, but here the bottleneck is external to the service (database), so scaling the service does not reduce the per-query wait time.

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

Optimize the database query and add appropriate indexes

The bottleneck is identified as a database query causing high latency. Optimizing the query and adding appropriate indexes directly reduces the time spent waiting on the database, which is the root cause. Cloud Trace shows the service is waiting on the database, so improving database performance is the most effective solution.

Answer analysis

Option-by-option breakdown

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

  • Decrease the number of pods to reduce load

    Why it's wrong here

    Reducing pods may increase latency due to less capacity.

  • Use Cloud CDN to cache database results

    Why it's wrong here

    Cloud CDN caches static content, not database responses.

  • Optimize the database query and add appropriate indexes

    Why this is correct

    Query optimization reduces execution time.

  • Increase the number of replicas for the service

    Why it's wrong here

    Scaling replicas doesn't speed up slow queries.

About these practice questions

One of 964 original PCD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 PCD 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 PCD exam.