CertSafari
    Snowflake SnowPro Advanced: Administrator (ADA-C02)· Lessons

    Domain 4 · Lesson 20/24

    Calculating and reducing Snowflake credit, storage and transfer costs

    Manage and optimize costs.

    12 min read
    4% of exam
    9 sources
    Published 20 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Calculate warehouse credits from size, runtime and the 60-second minimum
    • Measure warehouse idle-time cost with WAREHOUSE_METERING_HISTORY
    • Explain the cloud services 10% adjustment and find serverless, AI and Notebooks credits in their views
    • Account for Time Travel and Fail-safe storage and for data transfer and replication costs

    1.How warehouse credits are calculated

    A warehouse's credits depend on three things: its size, how long it runs and how many clusters are running. Each size step up roughly doubles both compute power and the hourly credit rate. A Small bills 2 credits per hour and a Medium bills 4. A warehouse is one or more clusters, and the size sets the resources of each cluster. A multi-cluster warehouse therefore bills for every cluster that is running (Multi-cluster warehouses and scaling policy covers when clusters start). Three Medium clusters running for an hour cost 12 credits. If a cluster runs with almost no queries, it shows up as idle credits, measured in the next section.

    Billing is per second with a 60-second minimum. Every start or resume bills one full minute at the hourly rate. After that, the warehouse is billed per second for as long as it keeps running. A 30-second run on a Medium is billed as 60 seconds, which is 4 ÷ 60 ≈ 0.067 credits. A 10-minute run costs 4 × 10 ÷ 60 ≈ 0.67 credits. A suspended warehouse uses no credits at all. Resizing upward also bills one minute, but only for the added resources: going from Small to Medium bills one minute of the 2 extra credits per hour.

    The suspend window itself is tuned as described in Auto-suspend and auto-resume. Two other controls cap spend. Because each size step doubles the hourly rate, restricting Warehouse privileges (USAGE, OPERATE, MODIFY, MONITOR) so that only a few roles hold MODIFY limits who can resize a warehouse or add clusters. A warehouse-level statement timeout (Timeout parameters) stops a runaway query before it runs up a large bill.

    Checkpoint 1 of 6· Check yourself

    A Small warehouse (2 credits/hour) has been running for 10 minutes when an administrator resizes it to Medium (4 credits/hour). What does the resize itself add to the bill?

    Sources12

    2.Measuring idle time with WAREHOUSE_METERING_HISTORY

    Idle time is the time a running warehouse bills credits while executing no queries. It is usually the largest waste you can recover, because user-managed warehouses bill while running whether or not they are working. ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY records each warehouse's credits by the hour. CREDITS_USED_COMPUTE is everything the warehouse consumed. CREDITS_ATTRIBUTED_COMPUTE_QUERIES is only the part spent running queries. The difference between the two is idle cost.

    Idle-time cost per warehouse over the last 10 dayssql
    SELECT
      (SUM(credits_used_compute) -
        SUM(credits_attributed_compute_queries)) AS idle_cost,
      warehouse_name
    FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
    WHERE start_time >= DATEADD('days', -10, CURRENT_DATE())
      AND end_time < CURRENT_DATE()
    GROUP BY warehouse_name;

    Read the result in proportion to total spend. Suppose a warehouse shows 40 idle credits out of 50. It spends most of its billed time waiting, so shorten its auto-suspend or move its work onto a busier warehouse. The same columns explain per-query chargeback. QUERY_ATTRIBUTION_HISTORY.CREDITS_ATTRIBUTED_COMPUTE excludes idle time, so per-query totals never add up to the warehouse bill. To charge idle time back as well, spread it across teams in proportion to their attributed credits. Note that CREDITS_ATTRIBUTED_COMPUTE_QUERIES is NULL for Adaptive Warehouses.

    For a closer look at warehouse activity, organization-level WAREHOUSE_LOAD_HISTORY and WAREHOUSE_EVENTS_HISTORY show load and warehouse events, with latency under 3 hours. Keep in mind that CREDITS_USED in WAREHOUSE_METERING_HISTORY is compute plus cloud services before the daily adjustment, so it can be more than what was billed.

    Checkpoint 2 of 6· Check yourself

    Summing QUERY_ATTRIBUTION_HISTORY.CREDITS_ATTRIBUTED_COMPUTE for last month's queries on a standard warehouse gives 30 credits. WAREHOUSE_METERING_HISTORY.CREDITS_USED_COMPUTE for the same warehouse and month shows 75. What best explains the 45-credit gap, and how should it be handled in chargeback?

    Sources314

    3.Cloud services adjustment and serverless credits

    Cloud services credits are billed only above a daily allowance. Each UTC day, Snowflake compares cloud services consumption with 10% of that day's warehouse credits and bills only the excess. The adjustment never exceeds the cloud services actually used. Take a day with 100 warehouse credits and 8 cloud services credits: the adjustment is 8 and nothing extra is billed. With 15 cloud services credits, 5 are billed. Serverless compute is left out of this calculation. Snowsight and most views show consumption before the adjustment, so query METERING_DAILY_HISTORY when you need billed credits.

    Serverless features run on compute that Snowflake sizes and scales. They are billed in compute-hours, measured per second and rounded up to the next whole second, and each feature has its own credits-per-hour rate. Each feature appears on the bill as a separate line that includes its own cloud services. The views below report each feature's credits, all with 1 year of retention at organization level.

    Serverless features and the view that reports their credits
    FeatureCost viewTaught in
    Automatic clusteringAUTOMATIC_CLUSTERING_HISTORYClustering keys and automatic clustering
    Materialized view refreshMATERIALIZED_VIEW_REFRESH_HISTORYViews, secure views and materialized views
    Serverless tasksSERVERLESS_TASK_HISTORYServerless vs user-managed tasks
    Query acceleration serviceQUERY_ACCELERATION_HISTORYQuery acceleration service
    SnowpipePIPE_USAGE_HISTORY—
    Search optimizationSEARCH_OPTIMIZATION_HISTORY—

    Automatic clustering is the serverless cost most likely to grow unnoticed. Group AUTOMATIC_CLUSTERING_HISTORY by day and by table, and compare each day with its m-day average. A table that DML keeps re-clustering will show steadily rising credits, and the fix may be to change or remove the clustering key. Track materialized views the same way: a view on a base table that changes often costs credits on every refresh.

    Checkpoint 3 of 6· Check yourself

    On one UTC day, an account uses 100 warehouse credits, 200 credits on Snowpipe and automatic clustering, and 18 cloud services credits. How many cloud services credits are billed for that day?

    Checkpoint 4 of 6· Match them up

    An administrator is investigating a rise in credits. Match each view to the cost question it answers.

    Tap a term, then the definition that fits it.

    Sources15

    4.AI function and Notebooks consumption

    Cortex AI is billed as serverless and has its own usage views, separate from warehouse metering. Per-query warehouse attribution excludes the cost of tokens processed by AI services, so a query that calls an AI function costs more than its attributed credits. The ACCOUNT_USAGE views split AI usage by product:

    • CORTEX_AI_FUNCTIONS_USAGE_HISTORY: credits consumed by Cortex AI Functions
    • CORTEX_FUNCTIONS_USAGE_HISTORY and CORTEX_FUNCTIONS_QUERY_USAGE_HISTORY: credits for calling Cortex LLM functions, and for the queries that use them
    • CORTEX_AGENT_USAGE_HISTORY, CORTEX_ANALYST_USAGE_HISTORY, CORTEX_SEARCH_SERVING_USAGE_HISTORY and CORTEX_FINE_TUNING_USAGE_HISTORY: credits for the matching Cortex service

    Notebooks running on the container runtime have their own record. NOTEBOOKS_CONTAINER_RUNTIME_HISTORY is a historical view with up to 5 hours of latency. At organization level it is a premium view, available only in the organization account. Use it, not WAREHOUSE_METERING_HISTORY, to see what notebook sessions on the container runtime consume. To include AI and agent spend in a monthly limit, use a budget: AI_SERVICES and AI_INFERENCE are services that both account and custom budgets support.

    Checkpoint 5 of 6· Check yourself

    A FinOps lead is signed in to a regular account that has ORGADMIN enabled. They want one report of what notebook sessions on the container runtime consumed across every account in the organization. What should they do?

    Sources5678

    5.Storage, data transfer and replication costs

    Storage is billed on every byte a table holds, including bytes kept only for recovery. Data moves from Active to Time Travel to Fail-safe, and every stage is billed. An updated or deleted row keeps costing storage until it leaves Fail-safe. Even plain loads add to the bill. When INSERT, COPY or Snowpipe loads data, small micro-partitions are combined into new ones, and the deleted originals are counted in TIME_TRAVEL_BYTES and FAILSAFE_BYTES. A heavily churned table can therefore cost more in protected bytes than in active ones.

    For account-wide storage, use Admin » Cost management » Consumption in Snowsight, which ACCOUNTADMIN can see. For the whole organization, use STORAGE_DAILY_HISTORY (2-hour latency), DATABASE_STORAGE_USAGE_HISTORY and STAGE_STORAGE_USAGE_HISTORY (24 hours each) in ORGANIZATION_USAGE, all with 1 year of retention.

    Data transfer and replication are tracked separately from storage. DATA_TRANSFER_HISTORY (24-hour latency) and DATA_TRANSFER_DAILY_HISTORY (2-hour latency) record bytes moved between regions and clouds. For Replication groups and failover groups, REPLICATION_GROUP_USAGE_HISTORY reports, per group, both the serverless credits each refresh used and the bytes it transferred. Multiply those bytes by your transfer rate and add the credits to get the full replication cost. Where possible, use DATABASE_REPLICATION_USAGE_HISTORY instead of the older REPLICATION_USAGE_HISTORY.

    Checkpoint 6 of 6· Check yourself

    Finance wants the full monthly cost of refreshing a replication group into a secondary account in another region. Which calculation captures that cost?

    Sources957

    Practise it for real

    Find how many credits each warehouse spent idle over the last 10 days, and check that figure against billed credits.

    1. 1.Run ALTER SESSION SET TIMEZONE = UTC; before querying.

      Why: The hourly buckets will then match the UTC days used by organization views and the cloud services adjustment.

      You should see: Statement executed successfully.

    2. 2.Run the idle-cost query against SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY from the idle-time section.

      Why: CREDITS_USED_COMPUTE minus CREDITS_ATTRIBUTED_COMPUTE_QUERIES is the credits spent while no query ran.

      You should see: One row per warehouse with an IDLE_COST value. Warehouses whose auto-suspend is too long show the largest values.

    3. 3.For your top idle warehouse, compare its idle cost with its total CREDITS_USED_COMPUTE for the same 10 days.

      Why: The share of idle time, not the raw number, tells you whether to change auto-suspend.

      You should see: A ratio. Above about half means the warehouse mostly waits.

    Stuck? Get a nudge

    Data from the last 3 hours may be missing because of view latency. That is why the query stops at CURRENT_DATE().

    Sources

    (9)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Snowflake credits are charged based on the number of virtual warehouses you use, how long they run, and their size.”
      ↩︎ How warehouse credits are calculated
      “Each increase in size to the next larger warehouse approximately doubles the computing power and the number of credits billed per full hour”
      ↩︎ How warehouse credits are calculated
      “credits are billed per-second, with a 60-second (i.e. 1-minute) minimum”
      ↩︎ How warehouse credits are calculated
      “In this table, the size specifies the compute resources per cluster available to the warehouse.”
      ↩︎ How warehouse credits are calculated
      “resizing from Small (2 credits/hour) to Medium (4 credits/hour)”
      ↩︎ How warehouse credits are calculated
      “user-managed virtual warehouses consume credits while running, regardless of whether they are performing any work”
      ↩︎ Measuring idle time with WAREHOUSE_METERING_HISTORY
      “Usage for cloud services is charged only if the daily consumption of cloud services exceeds 10% of the daily usage of virtual warehouses.”
      ↩︎ Cloud services adjustment and serverless credits
      “The daily adjustment never exceeds actual cloud services usage for that day.”
      ↩︎ Cloud services adjustment and serverless credits
      “Compute-Hours are calculated on a per second basis, rounded up to the nearest whole second.”
      ↩︎ Cloud services adjustment and serverless credits
      “Serverless compute does not factor into the 10% adjustment for cloud services.”
      ↩︎ Exam trap 2
      “results in multiple charges because the 1-minute minimum starts over each time a warehouse is resumed”
      ↩︎ Prediction
      “the number of credits billed are only for the additional compute resources that are provisioned”
      ↩︎ Checkpoint
      “user-managed virtual warehouses consume credits while running, regardless of whether they are performing any work, which may cause them to be overutilized or sit idle.”
      ↩︎ Checkpoint
      “Serverless compute does not factor into the 10% adjustment for cloud services.”
      ↩︎ Checkpoint
    2. 2.
      “you can avoid unexpected costs associated with runaway queries”
      ↩︎ How warehouse credits are calculated
    3. 3.
      “Warehouse idle time is not included in the CREDITS_ATTRIBUTED_COMPUTE_QUERIES column.”
      ↩︎ Measuring idle time with WAREHOUSE_METERING_HISTORY
      “The CREDITS_ATTRIBUTED_COMPUTE_QUERIES column is NULL for Adaptive Warehouses.”
      ↩︎ Measuring idle time with WAREHOUSE_METERING_HISTORY
    4. 4.
    5. 5.
      “Query: Automatic Clustering cost history (by day, by object) Query: Automatic Clustering History & m-day average”
      ↩︎ Cloud services adjustment and serverless credits
      “CORTEX_AI_FUNCTIONS_USAGE_HISTORY | Serverless | Credits consumed by Cortex AI Functions.”
      ↩︎ AI function and Notebooks consumption
      “Credits consumed and number of bytes transferred during replication for a specific replication group.”
      ↩︎ Storage, data transfer and replication costs
      “To determine how many credits were actually billed for compute costs, run queries against the METERING_DAILY_HISTORY view.”
      ↩︎ Exam trap 1
      “To determine how many credits were actually billed for compute costs, run queries against the METERING_DAILY_HISTORY view.”
      ↩︎ Checkpoint
    6. 7.
      “NOTEBOOKS_CONTAINER_RUNTIME_HISTORY | Historical | 5 hours | Premium view (only available in organization account).”
      ↩︎ AI function and Notebooks consumption
      “DATA_TRANSFER_DAILY_HISTORY | Historical | 2 hours | Data retained for 1 year.”
      ↩︎ Storage, data transfer and replication costs
    7. 8.
      “AI_SERVICES | ✔ | ✔ | Snowflake CoWork, Cortex Agent”
      ↩︎ AI function and Notebooks consumption
    8. 9.
      “Storage is calculated and charged for data regardless of whether it is in the Active, Time Travel, or Fail-safe state.”
      ↩︎ Storage, data transfer and replication costs
      “TIME_TRAVEL_BYTES and FAILSAFE_BYTES will incur charges when you load data using INSERT, COPY or SNOWPIPE.”
      ↩︎ Storage, data transfer and replication costs
      “updated/deleted data protected by CDP will continue to incur storage costs until the data leaves the Fail-safe state”
      ↩︎ Exam trap 3

    Ready to test yourself?

    Practise the 14 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.