SnowPro Core Certification — Question 1118
A query containing a WHERE clause is running longer than expected. The Query Profile shows that all micro-partitions being scanned.
How should this query be optimized?
Answer options
- A. Create a view on the table.
- B. Add a clustering key to the table.
- C. Add a LIMIT clause to the query.
- D. Add a Dynamic Data Masking policy to the table.
Correct answer: B
Explanation
The correct answer is B because adding a clustering key to the table can significantly improve query performance by optimizing data organization and reducing the number of partitions scanned. Options A, C, and D do not address the underlying issue of partition scanning and are unlikely to enhance the query's efficiency.