Courseiva
Develop for Azure storagemediumMultiple ChoiceObjective-mapped

AZ-204 Practice Question: Table Storage partition key design for…

An application stores sensor readings in Azure Table Storage. Each sensor produces thousands of readings per hour. Queries always filter by sensor ID and time range. A developer needs to choose the partition key and row key. Which design best balances query performance and write throughput?

⚠ Common exam trap

Test-takers frequently choose a partition key that groups data by time (Option C) to optimize time-range queries, but they overlook that this creates a hot partition for all sensors in that time window, severely limiting write throughput.

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: sensor ID; row key: ISO timestamp of the reading

It uses sensor ID as the partition key, which ensures all readings for a given sensor are stored in the same partition, enabling efficient range queries by row key (timestamp). This design avoids hot partitions by distributing writes across different sensors, while the row key allows fast point lookups and range scans within a time window, balancing query performance and write throughput.

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: sensor ID; row key: ISO timestamp of the reading

    Why this is correct

    This design effectively leverages Azure Table Storage's partitioning strategy. Grouping all readings for a specific sensor ID within a single partition ensures efficient retrieval of all data related to that sensor, as queries can target a specific partition. Using an ISO timestamp as the row key provides natural chronological ordering within the partition, enabling highly performant time-range queries for a given sensor without scanning unrelated data. This combination optimizes both data locality and query efficiency for typical IoT sensor data access patterns.

  • Partition key: a single constant ('all-sensors'); row key: sensor ID + timestamp

    Why it's wrong here

    Assigning a single constant value as the partition key for all sensor readings results in a "hot partition." Every write operation, regardless of the sensor, will target this solitary partition. Azure Table Storage enforces throughput limits at the partition level, meaning this design will quickly become a severe bottleneck for write-intensive workloads, leading to throttling and poor performance as the number of incoming sensor readings increases.

  • Partition key: timestamp (rounded to the hour); row key: sensor ID

    Why it's wrong here

    Partitioning data solely by a rounded timestamp, such as to the hour, distributes a single sensor's readings across numerous different partitions over time. Consequently, any query attempting to retrieve all readings for a specific sensor ID would necessitate scanning multiple, potentially hundreds or thousands, of partitions. This approach completely undermines the data locality benefits of partitioning, leading to highly inefficient and slow cross-partition queries for common sensor-centric data access patterns.

  • Partition key: random GUID per reading; row key: timestamp

    Why it's wrong here

    Using a random GUID as the partition key for each individual sensor reading effectively distributes write operations across a vast number of partitions, preventing hot spots. However, this strategy completely eliminates data locality for any meaningful query, including those filtering by sensor ID. Retrieving data for a specific sensor would require scanning every single partition in the table, resulting in extremely inefficient and costly cross-partition queries that scale poorly with data volume.

About these practice questions

This AZ-204 question is part of Courseiva's 881-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft 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 AZ-204 exam.