SnowPro Core Certification — Question 1282
How does Snowflake optimize queries on tables by leveraging the sorting and storage of data within micro-partitions?
Answer options
- A. The data is pruned by column to eliminate unnecessary micro-partitions, then the rows within the remaining micro-partitions are filtered.
- B. The data is pruned by micro-partitions based on column values, then rows within the remaining micro-partitions are filtered.
- C. Any micro-partitions that are not needed for the query are pruned, then the data within the remaining micro-partitions is pruned by column.
- D. The data within micro-partitions is sorted by rows, then the columns are filtered based on the query conditions.
Correct answer: B
Explanation
The correct answer is B because Snowflake optimizes query performance by pruning unnecessary micro-partitions based on the values of the columns, then filtering the rows in the remaining micro-partitions. Option A is incorrect as it suggests pruning by column before addressing micro-partitions. Option C misrepresents the order of operations, and option D incorrectly states that data is sorted by rows before filtering columns.