An engineer opens the Query Profile for a slow analytical query and sees a large value for 'Bytes spilled to local storage' and a smaller value for 'Bytes spilled to remote storage', while the query runs alone on the warehouse. They want to remove the spilling so the query completes faster. Which action most directly addresses what the profile is showing?
- AIncrease the warehouse to the next larger size so the single cluster gains more memory and local disk, reducing the spilling shown in the profile Correct
- BAdd a clustering key on the join columns so micro-partition pruning reduces the number of partitions the query has to scan during execution
- CConvert the warehouse to a multi-cluster warehouse so additional clusters share the workload and each cluster has to spill far fewer bytes for the query
- DEnable the query result cache so the spilled intermediate results are served from cache on the next run and the query finishes without spilling again
Why A is correct: Spilled bytes mean intermediate results exceeded available memory and local disk, so a larger size adds memory and local SSD per cluster and lets the query avoid spilling.
Why B is wrong: Clustering improves pruning of scanned partitions, but the profile shows a memory shortfall causing spilling, not excessive partition scanning, so clustering does not address the bottleneck.
Why C is wrong: Extra clusters add concurrency for separate queries, but one query runs on a single cluster, so multi-cluster scaling does not give this query more memory to stop spilling.
Why D is wrong: The result cache returns a whole prior result for an identical query, not intermediate spill data, so it does nothing for the spilling on this execution.