SnowPro Core free question 7 / 10 · Domain 4: Performance Optimization, Querying, and Transformation
For which kind of table is clustering most cost-effective?
- A small table with a few dozen rows in it
- A table that is queried frequently and does not change much
- A table that changes frequently and is queried rarely
- A table that is never read by any query at all
Show the answer and explanation
Answer: B
Why this is correct
The more frequently a table is queried, the more benefit clustering provides. The more frequently a table changes, the more expensive it is to keep it clustered. Clustering is therefore most cost-effective for tables that are queried often and do not change frequently.
Why the other options are wrong
"A table that changes frequently and is queried rarely" … A table that changes often is costly to keep clustered, and few queries means little benefit.
"A small table with a few dozen rows in it" … Clustering is a technique for large tables with many micro-partitions. A tiny table gains nothing.
"A table that is never read by any query at all" … A table that is never read gets no benefit from clustering, so the cost is wasted.
Key point
Clustering is not meant for every table, since initial clustering and ongoing maintenance consume credits. It suits tables with a large number of micro-partitions, typically multi-terabyte tables.
Go to the SnowPro Core practice app (10 free questions; purchase unlocks all questions)