SOL-C01 · Question #142
You have a virtual warehouse named `REPORTING that you want to resize from 'MEDIUM' to 'LARGE. You execute the following SQL command: ALTER WAREHOUSE REPORTING WH SET WAREHOUSE SIZE - LARGE WAIT FOR…
The correct answer is C. The warehouse will be resized to LARGE after all running queries complete on the MEDIUM. Option C is correct because in Snowflake, WAIT_FOR_COMPLETION = TRUE instructs the system to perform a graceful resize: it lets all currently running queries finish on the existing MEDIUM warehouse, and only then completes the transition to LARGE. New queries submitted after…
Question
You have a virtual warehouse named `REPORTING that you want to resize from 'MEDIUM' to 'LARGE. You execute the following SQL command: ALTER WAREHOUSE REPORTING WH SET WAREHOUSE SIZE - LARGE WAIT FOR COMPLETION = TRUE; After executing this command, what will be the state of the warehouse and running queries?
Options
- AThe warehouse will be resized to LARGE immediately, and all running queries will be terminated.
- BThe warehouse will be resized to LARGE, and all running queries will continue to run on the
- CThe warehouse will be resized to LARGE after all running queries complete on the MEDIUM
- DThe command will fail because = TRUE is not a valid option for ALTER WAREHOUSE.
- EThe warehouse will be resized to LARGE, and all running queries will automatically migrate to the
How the community answered
(39 responses)- A5% (2)
- B10% (4)
- C82% (32)
- D3% (1)
Explanation
Option C is correct because in Snowflake, WAIT_FOR_COMPLETION = TRUE instructs the system to perform a graceful resize: it lets all currently running queries finish on the existing MEDIUM warehouse, and only then completes the transition to LARGE. New queries submitted after the ALTER command are queued until the resize finishes.
- A is wrong - running queries are never terminated by a resize; Snowflake always protects in-flight work.
- B is wrong - while queries do continue running, they run on the original MEDIUM warehouse until completion, making "resized to LARGE immediately" inaccurate.
- D is wrong -
WAIT_FOR_COMPLETION = TRUEis a fully valid Snowflake parameter forALTER WAREHOUSE; the command executes successfully. - E is wrong - queries cannot migrate mid-execution to a different compute size; a query runs on the resources it started with, from start to finish.
Memory tip: Think of WAIT_FOR_COMPLETION = TRUE as a "last call" at a bar - no new drinks on the old tab, existing drinks get finished, then the new arrangement takes effect. Without it (the default FALSE), the resize happens immediately and new resources are provisioned in parallel.
Topics
Community Discussion
No community discussion yet for this question.