- Schema:
BLOCK_ STORAGE_ HISTORY view¶
Use the BLOCK_STORAGE_HISTORY view in the ACCOUNT_USAGE schema to query the average daily block storage and snapshot usage for an account within the last 365 days.
Columns¶
| Column Name | Data Type | Description |
|---|---|---|
| USAGE_DATE | TIMESTAMP_LTZ | Date of this storage usage record. The date is based on the local time zone. |
| STORAGE_TYPE | VARCHAR | BLOCK_STORAGE or SNAPSHOT. |
| COMPUTE_POOL_NAME | VARCHAR | Name of the compute pool associated with this storage usage. For the SNAPSHOT storage type, this field is NULL. |
| BYTES | NUMBER | Average number of bytes used on the given date. |
| ADDITIONAL_IOPS | NUMBER | Average number of additional IOPS used on the given date. |
| ADDITIONAL_THROUGHPUT | NUMBER | Average amount of additional throughput (MiB per second) used on the given date. |
Usage notes¶
-
Latency for the view can be up to 180 minutes (3 hours).
-
The view provides daily block storage and snapshot usage within the last 365 days (1 year) for an account.
-
Snapshots are not associated with compute pools; therefore, for snapshots the view has the NULL value in the COMPUTE_POOL_NAME column.
-
The BYTES column shows average usage of block storage volumes for a specific day, for a specific storage type, and for a specific compute pool (where appropriate) in the Snowflake account. For example, consider the following:
- You use a 10 GiB block volume for 6 hours on 2024-02-01 for compute pool POOL_1. Using 10 GiB for 6 hours is equivalent to 2.5 GiB per day (10 GiB * 6/24 hours = 2.5 GiB per day = 2,684,354,560 bytes per day).
- You use a 10 GiB block volume for 12 hours on 2024-02-01 for another compute pool POOL_2. Using 10 GiB for 12 hours is equivalent to 5 GiB per day (10 GiB * 12/24 hours = 5 GiB per day = 5,368,709,120 bytes per day).
- You use a 20 GiB snapshot for 24 hours on 2024-02-01. Using 20 GiB for 24 hours is equivalent to 20 GiB per day = 21,474,836,480 bytes per day.
Suppose that you query the BLOCK_STORAGE_HISTORY view:
The query returns the following results:
-
The additional IOPS (ADDITIONAL_IOPS) and throughput (ADDITIONAL_THROUGHPUT) values show the amount that your configured values exceed their default values. For example, on AWS, the block configuration default IOPS is 3,000, and the default throughput is 125 MiB/second. If you configure an AWS block device with 4,000 IOPS and 225 MiB/second throughput, the additional IOPS would be 1,000 (4,000 - 3,000), and the additional throughput would be 100 MiB/second (225 - 125).
The following three examples illustrate how you can get this information from the BLOCK_STORAGE_HISTORY view. Suppose that your account is set up with the following:
-
Your account provisioned a 10 GiB block volume (as part of a service) with 1000 additional IOPS and 100 MiB/second additional throughput for 6 hours on 2025-02-01 for compute pool
pool_1. If you query the view, you can get the following information from theadditional_iopsandadditional_throughputcolumns:- Using 10 GiB for 6 hours equals 2.5 GiB per day (10 GiB x 6/24 hours = 2.5 GiB = 2,684,354,560 bytes per day).
- Using 1000 additional IOPS for 6 hours equals 250 IOPS per day (1000 IOPS * 6/24 hours = 250 IOPS per day).
- Using 100 additional MiB/second for 6 hours equals average 25 MiB/second per day (100 MiB * 6/24 hours = 25 MiB per day).
-
Your account is provisioned a 10 GiB block volume (as part of a service) with 1 additional IOPS and 1 MiB/s additional throughput for 12 hours on 2025-02-01 for compute pool
POOL_2.- Using 10 GiB for 12 hours equals 5 GiB per day (10 GiB * 12/24 hours = 5 GiB per day = 5,368,709,120 bytes per day).
- 1 additional IOPS used for 12 hours equals 0.5 IOPS per day (1 IOPS * 12/24 hours = 0.5 IOPS per day).
- 1 additional MiB/second throughput MiB/s used for 12 hours equals 0.5 MiB/second per day (1 MiB * 12/24 hours = 0.5 MiB per day)
-
You use a 20 GiB snapshot for 24 hours on 2025-02-01. Using 20 GiB for 24 hours is equivalent to 20 GiB per day.
When you query the view:
The
bytes,additional_iops, andadditional_throughputcolumns in the query output provide this information:Note
- If you attach multiple block volumes to a compute pool, the view aggregates the usage and returns one row.
- If there are multiple snapshots present on a given day, the view aggregates the usage and returns one row.
- If you attach a single block volume to a compute pool and use it for three days, then the view returns three rows because the view reports daily usage for each compute pool having block volumes attached.
-