Design innovative, scalable, and highly available cloud database solutions →mediumMultiple ChoiceObjective-mapped
PCDE Practice Question: Design innovative, scalable, and highly available cloud database solutions
You are designing a Cloud SQL for PostgreSQL database. The application has a table with 1 million rows that is frequently queried using equality on the 'email' column and range queries on the 'created_at' column. Which index strategy minimizes query latency?
⚠ Common exam trap
A common misconception is that separate single-column indexes are equivalent to a composite index, but in PostgreSQL, separate indexes require bitmap scans or residual filtering, which are slower than a single composite index that matches the query's equality and range predicates.
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 B-tree index on (email, created_at).
A composite B-tree index on (email, created_at) allows the database to satisfy both the equality condition on 'email' and the range condition on 'created_at' in a single index scan. PostgreSQL can use the leftmost column for equality filtering and then traverse the index tree to retrieve the range portion efficiently, minimizing random I/O and query latency.
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 full-text index on email.
Why it's wrong here
Full-text is for text search, not equality.
- ✓
Create a composite B-tree index on (email, created_at).
Why this is correct
This index supports the exact query pattern.
- ✗
Create a B-tree index on email only.
Why it's wrong here
Does not help range queries on created_at.
- ✗
Create separate B-tree indexes on email and created_at.
Why it's wrong here
PostgreSQL can use both but may not be as efficient as a composite index.
Go deeper
Related to this question
About these practice questions
One of 1,446 original PCDE 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 →
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.