Courseiva
Question 646 of 1,446

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

A developer is building an application that uses Firestore (in Datastore mode). The application needs to query data across two properties: 'status' and 'timestamp', with an equality filter on 'status' and a range filter on 'timestamp'. Which three steps are required to support this query efficiently? (Choose THREE.)

⚠ Common exam trap

A common misconception is that Firestore in Datastore mode automatically creates composite indexes like Firestore Native mode does, but Datastore mode requires manual composite index creation. Also, index exemptions cannot replace proper composite index design.

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

Ensure that single-field indexes exist for both 'status' and 'timestamp'

Firestore (in Datastore mode) requires single-field indexes to be defined for each property used in a query, even when a composite index is also present. Without a single-field index on 'status' and 'timestamp', the query engine cannot efficiently evaluate the equality and range filters, leading to full table scans or query failures.

Answer analysis

Option-by-option breakdown

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

  • Ensure that single-field indexes exist for both 'status' and 'timestamp'

    Why this is correct

    Firestore in Datastore mode requires single-field indexes on both 'status' and 'timestamp' to support equality and range filters. These indexes are not automatically created; they must be manually defined. Ensuring they exist is necessary even when a composite index is present.

  • Enable automatic composite index creation in Firestore settings

    Why it's wrong here

    Automatic composite indexes are not a feature; they must be manually created.

  • Create an index exemption for the 'timestamp' field

    Why it's wrong here

    Index exemptions are for disabling indexes on arrays/maps, not needed here.

  • Create a composite index on the 'status' and 'timestamp' fields

    Why this is correct

    Composite index is needed for queries with multiple fields.

  • Use gcloud alpha firestore indexes composite create to define the index

    Why this is correct

    gcloud can be used to create composite indexes.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.