COF-C03 Question 82
Single answerAuto-SuspendA data engineering team uses a Snowflake virtual warehouse named ETL_WH to run batch jobs every 30 minutes. Each job typically runs for 3-5 minutes, and there are no user queries between runs. The team notices warehouse credits are higher than expected and wants to reduce compute cost without affecting job completion. Which configuration change is the BEST choice?
- A
Set AUTO_SUSPEND to 60 seconds and keep AUTO_RESUME enabled on ETL_WH
- B
Disable AUTO_SUSPEND so the warehouse remains warm between batch runs
- C
Increase the warehouse size so jobs complete faster, which automatically reduces idle billing
- D
Set AUTO_SUSPEND to 1800 seconds so the warehouse suspends just before the next scheduled run
Show answer and explanation
Correct answer: A
Explanation
For intermittent workloads, Snowflake best practice is to use AUTO_SUSPEND with a short timeout and AUTO_RESUME enabled. A warehouse consumes credits while running, even if it is idle, so the goal is to suspend it soon after work completes and let Snowflake automatically resume it for the next request. In this scenario, jobs run only a few minutes every 30 minutes, so leaving the warehouse active between runs wastes credits. According to Snowflake documentation on virtual warehouses, AUTO_SUSPEND defines the period of inactivity before suspension, and AUTO_RESUME automatically restarts the warehouse when a new query arrives. This combination is the most practical and cost-effective choice for scheduled batch processing with gaps between executions.
- A. Correct.
Correct. Setting AUTO_SUSPEND to a low value such as 60 seconds allows the warehouse to stop shortly after each batch completes, minimizing idle time and reducing credit consumption. Keeping AUTO_RESUME enabled ensures the next scheduled job can automatically start the warehouse when needed, which is the standard cost-optimization pattern for intermittent workloads.
- B. Incorrect.
Incorrect. Disabling AUTO_SUSPEND would keep the warehouse running continuously between jobs, causing unnecessary charges during the roughly 25 minutes of idle time in each 30-minute cycle. This is a common misconception based on wanting to avoid startup delay, but it increases cost for intermittent workloads.
- C. Incorrect.
Incorrect. Increasing warehouse size may reduce query runtime in some cases, but it does not automatically reduce idle billing. If the warehouse remains running between batch windows, Snowflake continues charging for the active warehouse. Warehouse sizing and auto-suspend address different cost/performance concerns.
- D. Incorrect.
Incorrect. Setting AUTO_SUSPEND to 1800 seconds means the warehouse would stay active for the full 30-minute interval, including the long idle period between jobs. This largely defeats the purpose of auto-suspend in this scenario. Some users choose this thinking it aligns with the schedule, but it preserves idle compute cost instead of reducing it.