
Explanation:
Option B is correct because it accurately describes Snowflake's two-stage optimization process. First, Snowflake uses micro-partition metadata (min/max values, distinct counts) to prune entire micro-partitions that don't contain relevant data for the query. Second, within the remaining micro-partitions, Snowflake filters rows based on query conditions. This approach minimizes I/O by eliminating unnecessary data reads at both the partition and row levels. Option A is incorrect because pruning happens at the micro-partition level first, not by column. Option C is incorrect because column pruning happens after micro-partition pruning, not before. Option D is incorrect because Snowflake doesn't sort data within micro-partitions by rows during query execution - the data is already stored in sorted columnar format.
Ultimate access to all questions.
No comments yet.
How does Snowflake optimize query performance by leveraging the sorted data and storage structure within micro-partitions?
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.