nerdexam
Snowflake

ADA-C01 · Question #38

An Administrator is evaluating a complex query using the EXPLAIN command. The Globalstats operation indicates 500 partitionsAssigned. The Administrator then runs the query to completion and opens…

The correct answer is C. Runtime optimizations such as join pruning can reduce the number of partitions and bytes. The EXPLAIN command returns the logical execution plan for a query, which shows the upper bound estimates for the number of partitions and bytes that might be scanned by the query. However, these estimates do not account for the runtime optimizations that Snowflake performs to…

Performance Monitoring and Tuning

Question

An Administrator is evaluating a complex query using the EXPLAIN command. The Globalstats operation indicates 500 partitionsAssigned. The Administrator then runs the query to completion and opens the Query Profile. They notice that the partitions scanned value is 429. Why might the actual partitions scanned be lower than the estimate from the EXPLAIN output?

Options

  • AThe EXPLAIN results always include a 10-15% safety factor in order to provide conservative
  • BThe GlobalStats partition assignment includes the micro-partitions that will be assigned for
  • CRuntime optimizations such as join pruning can reduce the number of partitions and bytes
  • DIn-flight data compression will result in fewer micro-partitions being scanned at the virtual

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    81% (26)
  • D
    9% (3)

Explanation

The EXPLAIN command returns the logical execution plan for a query, which shows the upper bound estimates for the number of partitions and bytes that might be scanned by the query. However, these estimates do not account for the runtime optimizations that Snowflake performs to improve the query performance and reduce the resource consumption. One of these optimizations is join pruning, which eliminates unnecessary partitions from the join inputs based on the join predicates. This can result in fewer partitions and bytes scanned than the estimates from the EXPLAIN output. Therefore, the actual partitions scanned value in the Query Profile can be lower than the partitionsAssigned value in the EXPLAIN output.

Topics

#EXPLAIN command#partition pruning#Query Profile#join pruning

Community Discussion

No community discussion yet for this question.

Full ADA-C01 Practice