nerdexam
Snowflake

ARA-C01 · Question #38

A table for IOT devices that measures water usage is created. The table quickly becomes large and contains more than 2 billion rows. The general query patterns for the table are: 1. DeviceId, lOT_time

The correct answer is C. Deviceld and Customerld. Clustering keys should be chosen based on columns most frequently used in filter predicates (WHERE clauses), as they determine how Snowflake organizes micro-partitions for efficient pruning. Per the query patterns, DeviceId, IOT_timestamp, and CustomerId are all used in filters.

Performance Optimization

Question

A table for IOT devices that measures water usage is created. The table quickly becomes large and contains more than 2 billion rows. The general query patterns for the table are: 1. DeviceId, lOT_timestamp and Customerld are frequently used in the filter predicate for the select statement 2. The columns City and DeviceManuf acturer are often retrieved 3. There is often a count on Uniqueld Which field(s) should be used for the clustering key?

Exhibit

ARA-C01 question #38 exhibit

Options

  • AlOT_timestamp
  • BCity and DeviceManuf acturer
  • CDeviceld and Customerld
  • DUniqueld

How the community answered

(40 responses)
  • A
    3% (1)
  • B
    8% (3)
  • C
    75% (30)
  • D
    15% (6)

Explanation

Clustering keys should be chosen based on columns most frequently used in filter predicates (WHERE clauses), as they determine how Snowflake organizes micro-partitions for efficient pruning. Per the query patterns, DeviceId, IOT_timestamp, and CustomerId are all used in filters. However, IOT_timestamp is a poor clustering key alone because it is monotonically increasing and high-cardinality, causing poor partition overlap. DeviceId and CustomerId (Option C) represent categorical identifiers with better cardinality characteristics for clustering. Option B (City and DeviceManufacturer) are only retrieved, not filtered. Option D (UniqueId) is used in COUNT aggregation, not filtering, and is too high-cardinality for effective clustering.

Topics

#Clustering Keys#Performance Optimization#Query Optimization#Data Modeling

Community Discussion

No community discussion yet for this question.

Full ARA-C01 Practice