Schema:

ORGANIZATION_USAGE

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

SEARCH_OPTIMIZATION_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 SEARCH_OPTIMIZATION_HISTORY view in the ORGANIZATION_USAGE schema is used for querying maintenance history for indexes maintained by the search optimization service. The information returned by the view includes the index, the base table, and the credits consumed each time a maintenance operation occurred.

Note

The INDEX_ID, INDEX_NAME, INDEX_TYPE, BASE_TABLE_ID, and BASE_TABLE_NAME columns replace TABLE_ID and TABLE_NAME when SEARCH_OPTIMIZATION_HISTORY views: New columns and column changes (Pending) is enabled. If you have scripts that query TABLE_ID or TABLE_NAME, update them to use the new column names.

Columns

Column NameData TypeDescription
ORGANIZATION_NAMEVARCHARName of the organization where the usage took place.
ACCOUNT_NAMEVARCHARName of the account where the usage took place.
ACCOUNT_LOCATORVARCHARName of the account locator.
REGIONVARCHARName of the region where the account is located.
USAGE_DATEDATEDate (in the UTC time zone) of this usage record.
CREDITS_USEDNUMBERNumber of credits billed for search optimization service index maintenance during the USAGE_DATE.
INDEX_IDNUMBERInternal/system-generated identifier for the index. Replaces TABLE_ID.
INDEX_NAMEVARCHARName of the index. Replaces TABLE_NAME. For a search optimization index, this is a system-generated alias of the form SEARCH OPTIMIZATION ON: <base_table_id>. For a search optimization secondary index, this is the customer-defined index name.
INDEX_TYPEVARCHARType of index maintained by the search optimization service. Possible values are Search Optimization Index and Secondary Index. Secondary Index is not a hybrid table secondary index.
BASE_TABLE_IDNUMBERInternal/system-generated identifier for the base table.
BASE_TABLE_NAMEVARCHARName of the base table.
SCHEMA_IDNUMBERInternal/system-generated identifier for the schema that contains the base table.
SCHEMA_NAMEVARCHARName of the schema that contains the base table.
DATABASE_IDNUMBERInternal/system-generated identifier for the database that contains the base table.
DATABASE_NAMEVARCHARName of the database that contains the base table.

Usage notes

  • Latency for the view may be up to 24 hours (1 day).
  • Use INDEX_TYPE to distinguish search optimization index maintenance (Search Optimization Index) from search optimization secondary index maintenance (Secondary Index). These values are not hybrid table secondary indexes.
  • INDEX_ID identifies the specific index. INDEX_NAME is a system-generated alias for a search optimization index (SEARCH OPTIMIZATION ON: <base_table_id>), or the customer-defined name for a search optimization secondary index.
  • BASE_TABLE_ID and BASE_TABLE_NAME identify the table that the index is defined on.