nerdexam
Snowflake

COF-C02 · Question #676

Which of the following is an example of an operation that can be completed without requiring compute, assuming no queries have been executed previously?

The correct answer is B. SELECT AVG(ORDER_QTY) FROM SALES. Snowflake's Cloud Services layer maintains column-level metadata statistics for each micro-partition, including row count, null count, min, max, and aggregate values for numeric columns (such as sum and count). For AVG(ORDER_QTY), Snowflake can derive the result from…

Performance Concepts

Question

Which of the following is an example of an operation that can be completed without requiring compute, assuming no queries have been executed previously?

Options

  • ASELECT SUM (ORDER_AMT) FROM SALES;
  • BSELECT AVG(ORDER_QTY) FROM SALES;
  • CSELECT MIN(ORDER_AMT) FROM SALES;
  • DSELECT ORDER_AMT * ORDER_QTY FROM SALES;

How the community answered

(40 responses)
  • A
    3% (1)
  • B
    90% (36)
  • C
    3% (1)
  • D
    5% (2)

Explanation

Snowflake's Cloud Services layer maintains column-level metadata statistics for each micro-partition, including row count, null count, min, max, and aggregate values for numeric columns (such as sum and count). For AVG(ORDER_QTY), Snowflake can derive the result from precomputed metadata (sum divided by count) without engaging a virtual warehouse. SUM(ORDER_AMT) and row-level expressions like ORDER_AMT * ORDER_QTY require scanning actual data. While MIN is also a metadata-available statistic, AVG(ORDER_QTY) is the answer the exam identifies as leveraging Snowflake's metadata optimization to avoid compute costs when the result cache is empty.

Topics

#Compute resources#Virtual warehouses#Query execution#Aggregate functions

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice