Question 1,254 of 1,786
Data Store ManagementmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to use user_id as the partition key and timestamp as the clustering column in descending order. This design is correct because it directly supports the access pattern of querying the last 10 records for a given user by allowing Keyspaces to perform an efficient range query within a single partition, reading only the most recent rows without scanning stale data. On the AWS Certified Data Engineer Associate DEA-C01 exam, this scenario tests your understanding of how partition key design and clustering order directly impact query performance in Amazon Keyspaces, a common trap being the assumption that ascending order is always sufficient. Remember that for latest records queries, descending clustering order turns a potentially expensive full-partition scan into a fast, targeted read of the top N rows. A useful memory tip: think of it as “reverse the clock” — when you need the newest data first, set your clustering column to DESC.

DEA-C01 Data Store Management Practice Question

This DEA-C01 practice question tests your understanding of data store management. 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 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?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

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).

Option D is correct because 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.

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.

  • 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.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    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 may 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.

Detailed technical explanation

How to think about this question

In Amazon Keyspaces (and Apache Cassandra), data within a partition is stored in the order defined by the clustering columns. By specifying 'timestamp' as a clustering column with descending order, Keyspaces physically stores the most recent records first within each partition, allowing the query to use a LIMIT 10 clause to read only the first 10 rows from the partition without scanning all data. This leverages the underlying SSTable structure and partition index for O(1) partition lookup and O(log n) row access within the partition.

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 company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

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.

Related practice questions

Related DEA-C01 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DEA-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 DEA-C01 question test?

Data Store Management — This question tests Data Store Management — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Partition key: user_id, clustering column: timestamp (descending order). — Option D is correct because 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.

What should I do if I get this DEA-C01 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 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 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.