- Schema:
For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).
POSTGRES_ COMPUTE_ USAGE_ HISTORY view¶
Organization Usage performance
When you query a specific view in the SNOWFLAKE.ORGANIZATION_USAGE schema, follow the organization-wide guidance in
Performance (Organization Usage): bound every scan on history views, list
columns explicitly, and use the time filter column table plus worked SQL and anti-patterns there.
The POSTGRES_COMPUTE_USAGE_HISTORY view in the ORGANIZATION_USAGE schema can be used to query the total hourly compute credit usage across all Postgres instances in your organization for the last 365 days (1 year).
Columns¶
| Column name | Data type | Description |
|---|---|---|
| ORGANIZATION_NAME | VARCHAR | Name of the organization where the usage took place. |
| ACCOUNT_NAME | VARCHAR | Name of the account where the usage took place. |
| ACCOUNT_LOCATOR | VARCHAR | Name of the account locator. |
| START_TIME | TIMESTAMP_LTZ | The date and beginning of the hour (in the local time zone) in which the usage took place. |
| END_TIME | TIMESTAMP_LTZ | The date and end of the hour (in the local time zone) in which the usage took place. |
| CREDITS_USED | NUMBER | Number of compute credits consumed by Postgres instances. |
Usage notes¶
- Latency for the view may be up to 24 hours (1 day).
- The data is retained for 365 days (1 year).
- The POSTGRES_COMPUTE_USAGE_HISTORY view and the Snowsight cost management tools can return different daily compute usage values. This discrepancy is caused by the methods used to determine compute usage. To determine these values, the POSTGRES_COMPUTE_USAGE_HISTORY view uses the current session’s TIMEZONE parameter and the Snowsight cost management tools use Coordinated Universal Time (UTC). To resolve any discrepancies, Snowflake recommends setting the TIMEZONE parameter to UTC.