- Schema:
SEARCH_ OPTIMIZATION_ HISTORY view¶
This Account Usage view can be used to query 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 by each maintenance operation.
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 Name | Data Type | Description |
|---|---|---|
| START_TIME | TIMESTAMP_LTZ | Start of the specified time range. |
| END_TIME | TIMESTAMP_LTZ | End of the specified time range. |
| CREDITS_USED | NUMBER | Number of credits billed for search optimization service index maintenance during the START_TIME and END_TIME window. |
| INDEX_ID | NUMBER | Internal/system-generated identifier for the index. Replaces TABLE_ID. |
| INDEX_NAME | VARCHAR | Name of the index. Replaces |
| INDEX_TYPE | VARCHAR | Type of index maintained by the search optimization service. Possible values are |
| BASE_TABLE_ID | NUMBER | Internal/system-generated identifier for the base table. |
| BASE_TABLE_NAME | VARCHAR | Name of the base table. |
| SCHEMA_ID | NUMBER | Internal/system-generated identifier for the schema that contains the base table. |
| SCHEMA_NAME | VARCHAR | Name of the schema that contains the base table. |
| DATABASE_ID | NUMBER | Internal/system-generated identifier for the database that contains the base table. |
| DATABASE_NAME | VARCHAR | Name of the database that contains the base table. |
Usage notes¶
- Billing history is not necessarily updated immediately. Latency for the view may be up to 180 minutes (3 hours).
-
Use
INDEX_TYPEto 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_IDidentifies the specific index.INDEX_NAMEis 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_IDandBASE_TABLE_NAMEidentify the table that the index is defined on. -
The output contains one row for each maintenance operation that is executed. Each operation updates information about one index. The number of operations executed on each index depends on the number and size of updates to the data in the base table.
You can use combinations of aggregate functions and GROUP BY clauses to aggregate costs per index, per base table, or across all tables.
-
If you want to reconcile the data in this view with a corresponding view in the ORGANIZATION USAGE schema, you must first set the timezone of the session to UTC. Before querying the Account Usage view, execute: