Courseiva

PCDE Practice Question: Manage a solution that can span multiple database technologies

A company uses Firestore in Native mode. They have a collection with 1 million documents and frequently run queries that filter on two fields: status and createdAt. The queries are slow. What should the team do?

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

Create a composite index on (status, createdAt)

Firestore creates single-field indexes automatically but for multi-field queries, a composite index must be created manually. Without it, queries may be slow or fail.

Answer analysis

Option-by-option breakdown

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

  • Create a composite index on (status, createdAt)

    Why this is correct

    Composite indexes are required for queries on multiple fields to be efficient.

  • Create an index exemption for the status field

    Why it's wrong here

    Index exemptions are for arrays/maps, not for query performance.

  • Use the Datastore mode instead

    Why it's wrong here

    Switching modes is not necessary and does not automatically create composite indexes.

  • Add an index exemption for the createdAt field

    Why it's wrong here

    Exemptions are not for performance.

About these practice questions

This PCDE question is part of Courseiva's 1,446-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.