COF-C03 - Performance Optimization, Querying, and Transformation (21% of the exam) - Section 4.1

Use Query Profile and query history to analyse, troubleshoot, and interpret query performance.

Use Query Profile to read a query's execution plan: the operator tree, the most expensive nodes, partitions scanned versus total, and warnings such as bytes spilled to local or remote storage. Use the query history and the QUERY_HISTORY views to find slow or queued queries and interpret what is limiting performance.

Query Profilequery historyQUERY_HISTORYbytes spilledpartitions scanned

Practice question for this objective

Free samplePerformance Optimization, Querying, and Transformationmedium

A developer is troubleshooting a slow multi-join query and opens its Query Profile to find which step is consuming the most resources. They want to pinpoint the single operator that is the most expensive so they can target their tuning effort there. Which feature of Query Profile should they rely on to find it?

  • AThe query id displayed in the profile header, which encodes the slowest operator in its suffix so the expensive step can be decoded directly from the id
  • BThe warehouse size badge on the profile, which turns red on the operator that spilled so the slowest step is always the one flagged by that badge
  • CThe total elapsed time figure at the top of the profile, which by itself tells the developer which join operator dominated the query runtime
  • DThe percentage of execution time shown on each operator node, which ranks the nodes so the costliest operator can be identified and tuned first Correct
Use the per-operator execution time percentage in Query Profile to locate the single most expensive step in a query plan. Query Profile renders the query plan as a tree of operator nodes, and each node shows the percentage of total execution time it consumed. The node with the highest percentage is the bottleneck, so reading these per-operator figures lets a developer target tuning at the operator that actually dominates the runtime rather than guessing.

Why A is wrong: The query id is an opaque identifier and does not encode operator cost, so it cannot reveal which step in the plan is the most expensive.

Why B is wrong: The profile shows warehouse details but no per-operator size badge that flags the slowest step, so this is not how the expensive operator is found.

Why C is wrong: Total elapsed time gives the whole query duration only and does not attribute cost to any single operator, so it cannot isolate the most expensive step.

Why D is correct: Each operator node in Query Profile reports its share of total execution time, so reading the highest percentage points the developer straight to the costliest step to tune.

See more COF-C03 practice questions, answers explained.

Exam traps in Performance Optimization, Querying, and Transformation

Answers that look right on this material and are not. Each one is a distractor from a different question in the COF-C03 bank for this domain.

  • Partitions scanned reflects only the columns projected, so selecting fewer columns will lower it and the filter predicate has no bearing on the partitions read

    Why it is wrong: Column projection affects bytes read per partition, not how many partitions are pruned, so reducing columns does not lower the high partitions scanned the analyst sees.

  • Add a clustering key on the join columns so micro-partition pruning reduces the number of partitions the query has to scan during execution

    Why it is wrong: Clustering improves pruning of scanned partitions, but the profile shows a memory shortfall causing spilling, not excessive partition scanning, so clustering does not address the bottleneck.

  • The warehouse is too small, because a high compilation time always means the compute ran out of memory while planning the joins across the many tables involved

    Why it is wrong: Compilation runs in the cloud services layer rather than on the warehouse, so a large compile time does not point to an undersized warehouse or to memory exhaustion during planning.

Examworthy is not affiliated with or endorsed by Snowflake. Original, blueprint-aligned practice material only.