- A
Create a hash index on the email column.
Why wrong: Hash indexes support only equality comparisons, not LIKE.
- B
Increase the shared_buffers parameter to improve caching.
Why wrong: Caching may help but does not address the lack of a suitable index for pattern matching.
- C
Create a B-tree index on the reversed email string.
Why wrong: B-tree indexes do not support leading wildcard LIKE queries efficiently.
- D
Create a trigram index (using pg_trgm extension) on the email column.
Trigram indexes are designed for fast LIKE queries.
Quick Answer
The correct action is to create a trigram index using the pg_trgm extension on the email column. A standard B-tree index cannot accelerate a LIKE query with a leading wildcard, such as `'%@example.com'`, because the database has no fixed prefix to begin a sorted scan. The pg_trgm extension solves this by breaking strings into three-character substrings (trigrams) and indexing them, enabling the query planner to match patterns efficiently even when the wildcard appears at the start. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of PostgreSQL index types beyond B-tree, specifically for pattern-matching performance. A common trap is assuming a B-tree index will help any LIKE query, but remember: leading wildcards break B-tree scans. Memory tip: “Trigram for leading wildcard” — if the pattern starts with `%`, think trigram.
DBS-C01 Workload-Specific Database Design Practice Question
This DBS-C01 practice question tests your understanding of workload-specific database design. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company runs a customer relationship management (CRM) application on Amazon RDS for PostgreSQL. The application stores customer data in a table with over 50 million rows. The company recently added a new query that searches for customers by their email domain (e.g., '@example.com'). The query uses a LIKE pattern: 'WHERE email LIKE ''%@example.com'''. The query takes over 30 seconds to complete. The DBA has already created a B-tree index on the email column, but it does not help. Which action should the database specialist recommend to improve query performance?
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 trigram index (using pg_trgm extension) on the email column.
The query uses a leading wildcard LIKE pattern ('%@example.com'), which prevents a standard B-tree index from being used because the search string does not have a fixed prefix. A trigram index, provided by the pg_trgm extension, breaks strings into three-character substrings (trigrams) and allows the database to efficiently match patterns with leading wildcards. This index type is specifically designed for fuzzy text matching and LIKE queries with wildcards, reducing the query time from over 30 seconds to milliseconds.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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 hash index on the email column.
Why it's wrong here
Hash indexes support only equality comparisons, not LIKE.
- ✗
Increase the shared_buffers parameter to improve caching.
Why it's wrong here
Caching may help but does not address the lack of a suitable index for pattern matching.
- ✗
Create a B-tree index on the reversed email string.
Why it's wrong here
B-tree indexes do not support leading wildcard LIKE queries efficiently.
- ✓
Create a trigram index (using pg_trgm extension) on the email column.
Why this is correct
Trigram indexes are designed for fast LIKE queries.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume a B-tree index can handle all LIKE patterns, but AWS specifically tests the understanding that leading wildcards disable B-tree index scans, requiring a specialized index like pg_trgm for pattern-matching performance.
Detailed technical explanation
How to think about this question
The pg_trgm extension works by generating all trigrams from the indexed text and storing them in a GIN or GiST index; for a LIKE pattern with a leading wildcard, PostgreSQL can use the trigram index to find rows where the pattern's trigrams match, dramatically reducing the search space. Under the hood, the index stores trigrams as lexemes, and the query planner uses the similarity or containment operators to skip irrelevant rows. In real-world scenarios, trigram indexes are also effective for spelling correction, fuzzy matching, and full-text search alternatives when standard B-tree indexes fail.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Workload-Specific Database Design — study guide chapter
Learn the concepts, then practise the questions
- →
Workload-Specific Database Design practice questions
Targeted practice on this topic area only
- →
All DBS-C01 questions
1,730 questions across all exam domains
- →
AWS Certified Database Specialty DBS-C01 study guide
Full concept coverage aligned to exam objectives
- →
DBS-C01 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related DBS-C01 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Workload-Specific Database Design practice questions
Practise DBS-C01 questions linked to Workload-Specific Database Design.
Deployment and Migration practice questions
Practise DBS-C01 questions linked to Deployment and Migration.
Management and Operations practice questions
Practise DBS-C01 questions linked to Management and Operations.
Monitoring and Troubleshooting practice questions
Practise DBS-C01 questions linked to Monitoring and Troubleshooting.
Database Security practice questions
Practise DBS-C01 questions linked to Database Security.
DBS-C01 fundamentals practice questions
Practise DBS-C01 questions linked to DBS-C01 fundamentals.
DBS-C01 scenario practice questions
Practise DBS-C01 questions linked to DBS-C01 scenario.
DBS-C01 troubleshooting practice questions
Practise DBS-C01 questions linked to DBS-C01 troubleshooting.
Practice this exam
Start a free DBS-C01 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this DBS-C01 question test?
Workload-Specific Database Design — This question tests Workload-Specific Database Design — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Create a trigram index (using pg_trgm extension) on the email column. — The query uses a leading wildcard LIKE pattern ('%@example.com'), which prevents a standard B-tree index from being used because the search string does not have a fixed prefix. A trigram index, provided by the pg_trgm extension, breaks strings into three-character substrings (trigrams) and allows the database to efficiently match patterns with leading wildcards. This index type is specifically designed for fuzzy text matching and LIKE queries with wildcards, reducing the query time from over 30 seconds to milliseconds.
What should I do if I get this DBS-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
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 →
Last reviewed: Jun 24, 2026
This DBS-C01 practice question is part of Courseiva's free Amazon Web Services 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 DBS-C01 exam.
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.
Sign in to join the discussion.