If a table has many micro-partitions and a query scans all of them, what does that indicate about partition pruning?

Master Snowflake Data Engineer Exam. Study with flashcards and multiple choice questions, each question includes hints and explanations. Prepare for your success!

Multiple Choice

If a table has many micro-partitions and a query scans all of them, what does that indicate about partition pruning?

Explanation:
Partition pruning works by skipping micro-partitions that cannot contain the query results based on the filters and the metadata Snowflake stores for those partitions. If a query ends up scanning all micro-partitions, pruning isn’t eliminating any partitions, so its effectiveness for that query is not good. This typically happens when there are no selective predicates on the partitioned columns or the filters are broad enough that nearly every partition could satisfy them. Snowflake’s zone maps and min/max metadata allow pruning only when the query predicates are selective with respect to the partitioning; otherwise you end up reading all partitions, which is less efficient.

Partition pruning works by skipping micro-partitions that cannot contain the query results based on the filters and the metadata Snowflake stores for those partitions. If a query ends up scanning all micro-partitions, pruning isn’t eliminating any partitions, so its effectiveness for that query is not good. This typically happens when there are no selective predicates on the partitioned columns or the filters are broad enough that nearly every partition could satisfy them. Snowflake’s zone maps and min/max metadata allow pruning only when the query predicates are selective with respect to the partitioning; otherwise you end up reading all partitions, which is less efficient.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy