DEA-C01 Data Store Management Practice Question
A company is migrating an on-premises Apache Cassandra database to Amazon Keyspaces. The database has a table with a partition key of 'user_id' and a clustering column of 'timestamp'. The application frequently queries the last 10 records for a given user. Which table design in Keyspaces would provide the BEST query performance for this access pattern?
⚠ Common exam trap
Many exam-takers think a random partition key (Option A) or timestamp-based partition key (Option B) improves write distribution, but they overlook that the query pattern requires efficient reads within a single partition, which is best achieved by using the query filter column as the partition key and the sort column as the clustering key with the appropriate order.
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
✓
Partition key: user_id, clustering column: timestamp (descending order).
It preserves the original Cassandra table design with 'user_id' as the partition key and 'timestamp' as the clustering column in descending order. This allows Keyspaces to efficiently retrieve the last 10 records for a given user by performing a range query on the clustering column within a single partition, avoiding full table scans or cross-partition queries.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Partition key: random column, clustering column: none.
Why it's wrong here
Random partition key distributes data evenly but prevents efficient per-user queries.
- ✗
Partition key: timestamp, clustering column: user_id.
Why it's wrong here
This design spreads a user's data across multiple partitions, requiring scans of all partitions to get recent records for a user.
- ✗
Partition key: user_id, clustering column: none.
Why it's wrong here
Without a clustering column, the table cannot order rows by timestamp within a partition.
- ✓
Partition key: user_id, clustering column: timestamp (descending order).
Why this is correct
This design groups all records for a user in one partition and sorts by timestamp descending, enabling efficient retrieval of the last 10 records.
Go deeper
Related to this question
About these practice questions
This DEA-C01 question is part of Courseiva's 1,711-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DEA-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 DEA-C01 exam.