nerdexam
Snowflake

COF-C02 · Question #688

A sales table FCT_SALES has 100 million records. The following Query was executed SELECT COUNT (1) FROM FCT__SALES; How did Snowflake fulfill this query?

The correct answer is D. Query against the metadata excite. Snowflake stores table-level metadata-including row counts-in its cloud services layer, separate from the actual micro-partition data files. A simple COUNT(1) or COUNT(*) with no filters can be answered entirely from this metadata without spinning up a virtual warehouse or…

Snowflake Cloud Data Platform Features and Architecture

Question

A sales table FCT_SALES has 100 million records. The following Query was executed SELECT COUNT (1) FROM FCT__SALES; How did Snowflake fulfill this query?

Options

  • AQuery against the result set cache
  • BQuery against a virtual warehouse cache
  • CQuery against the most-recently created micro-partition
  • DQuery against the metadata excite

How the community answered

(23 responses)
  • B
    4% (1)
  • C
    4% (1)
  • D
    91% (21)

Explanation

Snowflake stores table-level metadata-including row counts-in its cloud services layer, separate from the actual micro-partition data files. A simple COUNT(1) or COUNT(*) with no filters can be answered entirely from this metadata without spinning up a virtual warehouse or scanning any micro-partitions. This is why the query completes near-instantly regardless of table size. The result cache (A) would only apply if the exact same query had been run recently. The warehouse cache (B) stores columnar data already pulled into memory. Scanning the most-recent micro-partition (C) would be inaccurate and wasteful. Metadata resolution (D) is the correct and efficient mechanism used here.

Topics

#Snowflake metadata#COUNT(1) optimization#Cloud Services layer#Query performance

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice