Schema:

ORGANIZATION_USAGE

For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).

QUERY_INSIGHTS view

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

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.

This Organization Usage view displays a row for each insight produced for a query across the accounts in your organization. It contains the same data as the QUERY_INSIGHTS view in the ACCOUNT_USAGE schema, additionally aggregated at the organization level.

This view is available only in the organization account. Users with the GLOBALORGADMIN role, or users granted the SNOWFLAKE.ORGANIZATION_GOVERNANCE_VIEWER application role, can access it. For details, see Accessing the ORGANIZATION_USAGE schema.

Columns

Organization-level columns

Column NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization.
ACCOUNT_LOCATORVARCHARSystem-generated identifier for the account.
ACCOUNT_NAMEVARCHARUser-defined identifier for the account.

Additional columns

Column NameData TypeDescription
START_TIMETIMESTAMP_LTZStart time of the query.
END_TIMETIMESTAMP_LTZEnd time of the query.
TOTAL_ELAPSED_TIMENUMBERTotal elapsed time of the query (in milliseconds).
QUERY_IDVARCHARInternal/system-generated identifier for the SQL statement.
QUERY_HASHVARCHARThe hash value computed based on the canonicalized SQL text.
QUERY_PARAMETERIZED_HASHVARCHARThe hash value computed based on the parameterized query.
WAREHOUSE_IDVARCHARInternal/system-generated identifier for the warehouse that was used.
WAREHOUSE_NAMEVARCHARWarehouse that the query executed on, if any.
INSIGHT_INSTANCE_IDNUMBERInternal/system-generated identifier for the insight.
INSIGHT_TYPE_IDVARCHARIdentifier of the insight type.
MESSAGEVARIANTStructured information and details about the insight.
SUGGESTIONSARRAYArray of strings, each containing a recommended action for the insight.
IS_OPPORTUNITYBOOLEANIf true, the insight includes suggestions to improve query performance.
INSIGHT_TOPICVARCHARLabel that identifies the type of performance impact detected by this insight. For the list of labels, see Insight topics.

Usage notes

  • Latency for the view may be up to 24 hours.
  • The data is retained for 365 days (1 year).

Examples

For example queries, see the QUERY_INSIGHTS view in the ACCOUNT_USAGE schema. To find organization-level information, replace SNOWFLAKE.ACCOUNT_USAGE with SNOWFLAKE.ORGANIZATION_USAGE in the queries.