Credit consumption measures the Snowflake credits charged for warehouse activity during execution. Data engineers monitor it alongside query performance to balance faster processing against cost, especially when warehouse sizing or long-running queries changes the warehouse’s active time. section 9.0
Estimate and interpret consumption with these operational rules:
- Convert credits per hour to credits per second by dividing by 3,600, then multiply by total execution time in seconds. section 9.2.2
- Treat the calculation as an approximation because a warehouse is billed for its initial 60 seconds whenever it starts. section 9.2.2
- Avoid assigning all warehouse cost to one query when multiple users run queries simultaneously; active warehouse time serves concurrent work. section 9.2.2
- Compare warehouse sizes over time, starting smaller and increasing size when query duration, spilling, or concurrency justifies it. section 9.0 section 9.2.2
Table 9.3 Calculation of the credits consumed by the query from listing 9.1 using differently sized virtual warehouses
|
Warehouse size
|
Credits per hour
|
Total execution time in seconds
|
Credits consumed
|
|---|---|---|---|
|
X-small
|
1
|
22
|
(1/3,600) * 22 = 0.0061
|
|
Small
|
2
|
10
|
(2/3,600) * 10 = 0.0056
|
|
Medium
|
4
|
6
|
(4/3,600) * 6 = 0.0067
|
|
Large
|
8
|
4
|
(8/3,600) * 4 = 0.0089
|
Compare estimated credits consumed across X-small, small, medium, and large warehouses using hourly credit rates and execution times. section 9.2.2
