- 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 |
TEXT |
|
COMPUTE_POOL_NAME |
TEXT |
Name of the compute pool associated with this storage usage. For the |
BYTES |
NUMBER |
Average number of bytes 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 GB block volume for 6 hours on 2024-02-01 for compute pool POOL_1. Using 10 GB for 6 hours is equivalent to 2.5 GB per day (10 GB * 6/24 hours = 2.5 GB = 2500000000 bytes per day).
You use a 10 GB block volume for 12 hours on 2024-02-01 for another compute pool POOL_2. Using 10 GB for 12 hours is equivalent to 5 GB per day (10 GB * 12/24 hours = 5 GB = 5000000000 bytes per day).
You use a 20 GB snapshot for 24 hours on 2024-02-01. Using 20 GB for 24 hours is equivalent to 20 GB (20000000000 bytes) per day.
Suppose that you query the BLOCK_STORAGE_HISTORY view:
SELECT * FROM snowflake.account_usage.BLOCK_STORAGE_HISTORY
The query returns the following results:
+-------------------------------+---------------+-----------------------+----------------+ | USAGE_DATE | STORAGE_TYPE | COMPUTE_POOL_NAME | BYTES | |-------------------------------+---------------+-----------------------+----------------| | 2024-02-01 00:00:00.000 -0700 | BLOCK_STORAGE | POOL_1 | 2500000000 | | 2024-02-01 00:00:00.000 -0700 | BLOCK_STORAGE | POOL_2 | 5000000000 | | 2024-02-01 00:00:00.000 -0700 | SNAPSHOT | NULL | 20000000000 | +-------------------------------+---------------+-----------------------+----------------+
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.