Understanding Billing for Serverless Features

Certain Snowflake features rely on compute resources provided by Snowflake (aka serverless compute model) rather than user-managed virtual warehouses. These compute resources are automatically resized and scaled up or down by Snowflake as required for each workload.

For these features, which usually require continuous and/or maintenance operations, this model is more efficient, allowing Snowflake to charge based on the time spent using the resources. In contrast, 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.

In this Topic:

Serverless Features

The following features utilize Snowflake-managed compute resources:

Functional Area

Feature

Usage

Tables

Automatic Clustering

Automated background maintenance of each clustered table, including initial clustering and reclustering as needed.

Search Optimization Service

Automated background maintenance of the search access paths used by the search optimzation service.

Views

Materialized views maintenance

Automated background synchronization of each materialized view with changes in the base table for the view.

Data loading

Snowpipe

Automated processing of file loading requests for each pipe object.

Database replication

Database Replication and Failover/Failback

Automated copying of data between accounts, including initial data replication and maintenance as needed.

Billing for Serverless Features

Features that rely on Snowflake-managed compute resources appear on your bill as separate line items. Charges for these features are calculated based on total usage of the resources (including cloud service usage) measured in compute-hours credit usage. One compute-hour is comparable to the computing resources utilized when running an X-Small virtual warehouse for an hour.

For more details about each feature, see the corresponding topics for each features.

Important

The credits used by these serverless features are not monitored or controlled by resource monitors; resource monitors only work with the virtual warehouses that you create/manage in your account.

Credit Usage for Serverless Features

Compute-hours credit usage for serverless features can be viewed through the the Snowflake web interface or SQL.

To view the monthly or daily usage for these features for your account:

Web Interface
  1. Click on Account Account tab » Billing & Usage.

  2. Usage is displayed as Snowflake-provided virtual warehouses:

    • AUTOMATIC_CLUSTERING

    • SEARCH_OPTIMIZATION_SERVICE

    • MATERIALIZED_VIEW_MAINTENANCE

    • REPLICATION

    • SNOWPIPE

Note that these virtual warehouses are provided and maintained by Snowflake; they cannot be modified (stopped, resumed, resized, dropped, etc.). In addition, they are not displayed in the interface pages or views where the virtual warehouses that you create are displayed.

Also, these warehouses are displayed in this tab only if the corresponding serverless feature has used credits for the month.

SQL

Query the following:

Name

Information Schema

Account Usage

AUTOMATIC_CLUSTERING_HISTORY

Table function

View

SEARCH_OPTIMIZATION_HISTORY

Table function

View

MATERIALIZED_VIEW_REFRESH_HISTORY

Table function

View

REPLICATION_USAGE_HISTORY

Table function

View

PIPE_USAGE_HISTORY

Table function

View

For example, to get information about the costs of maintenance for the search optimization service, run the following command:

SELECT * FROM TABLE(INFORMATION_SCHEMA.SEARCH_OPTIMIZATION_HISTORY());

To get the credits billed for the search optimization service on July 1, 2020 for each schema and database, run the following command:

SELECT database_name, schema_name, credits_used
    FROM SNOWFLAKE.ACCOUNT_USAGE.SEARCH_OPTIMIZATION_HISTORY
    WHERE start_time >= '2020-07-01 00:00:00.000' AND
          end_time    < '2020-07-02 00:00:00.000' ;