Courseiva
Workload-Specific Database DesignhardMultiple ChoiceObjective-mapped

DBS-C01 Workload-Specific Database Design Practice Question

A company is designing a time-series database for IoT sensor data using Amazon DynamoDB. Each sensor sends a reading every second. The table uses 'sensor_id' as partition key and 'timestamp' as sort key. The application queries for the last hour of data for a specific sensor. The query uses 'KeyConditionExpression' with 'timestamp' between start and end time. The table has auto-scaling enabled. However, the query latency is high. What is the MOST likely cause?

⚠ Common exam trap

Many candidates assume high query latency is always due to insufficient read capacity or caching, rather than recognizing that inefficient query design—specifically scanning too many items—is the most common cause in time-series patterns.

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

The query is scanning from the beginning of time; use 'ScanIndexForward: false' and a 'Limit' parameter.

The high query latency is most likely due to the query scanning all historical data for the sensor before applying the filter on the sort key. By default, DynamoDB queries return results in ascending order of the sort key, and without `ScanIndexForward: false` and a `Limit` parameter, the query may process many irrelevant items before reaching the last hour of data. Setting `ScanIndexForward: false` returns the most recent items first, and adding a `Limit` reduces the number of items scanned, significantly improving 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.

  • Enable DynamoDB Accelerator (DAX) to cache the query results.

    Why it's wrong here

    Does not fix the underlying query inefficiency; still consumes many RCUs.

  • The sort key should be 'sensor_id' and partition key should be 'timestamp'.

    Why it's wrong here

    Would break the query pattern for a specific sensor.

  • The query is scanning from the beginning of time; use 'ScanIndexForward: false' and a 'Limit' parameter.

    Why this is correct

    Reverses the sort order to retrieve recent items first, reducing scanned data.

  • The table does not have enough read capacity units; increase the base capacity.

    Why it's wrong here

    Auto-scaling would increase capacity if needed; the issue is query pattern.

About these practice questions

Courseiva writes every DBS-C01 question from scratch — 1,663 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.