ExamGecko
Question list
Search
Search

Question 27 - COF-C02 discussion

Report
Export

What happens to the underlying table data when a CLUSTER BY clause is added to a Snowflake table?

A.
Data is hashed by the cluster key to facilitate fast searches for common data values
Answers
A.
Data is hashed by the cluster key to facilitate fast searches for common data values
B.
Larger micro-partitions are created for common data values to reduce the number of partitions that must be scanned
Answers
B.
Larger micro-partitions are created for common data values to reduce the number of partitions that must be scanned
C.
Smaller micro-partitions are created for common data values to allow for more parallelism
Answers
C.
Smaller micro-partitions are created for common data values to allow for more parallelism
D.
Data may be colocated by the cluster key within the micro-partitions to improve pruning performance
Answers
D.
Data may be colocated by the cluster key within the micro-partitions to improve pruning performance
Suggested answer: D

Explanation:

When aCLUSTER BYclause is added to a Snowflake table, it specifies one or more columns to organize the data within the table's micro-partitions. This clustering aims to colocate data with similar values in the same or adjacent micro-partitions. By doing so, it enhances the efficiency of query pruning, where the Snowflake query optimizer can skip over irrelevant micro-partitions that do not contain the data relevant to the query, thereby improving performance.

References:

Snowflake Documentation on Clustering Keys & Clustered Tables1.

Community discussions on how source data's ordering affects a table with a cluster key

asked 23/09/2024
Ahmed Alghadeer
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first