Note
- This view is available starting with V4.3.0 for V4.3.x.
- This view is available starting with V4.2.3 for V4.2.x.
Purpose
The CDB_INDEX_USAGE view displays the usage data of indexes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The container ID (tenant ID). |
| OBJECT_ID | bigint(20) | NO | The index table ID. |
| NAME | varchar(128) | NO | The index table name. |
| OWNER | varchar(128) | NO | The database name. |
| TOTAL_ACCESS_COUNT | bigint(20) | NO | The total number of accesses. |
| TOTAL_EXEC_COUNT | bigint(20) | NO | The total number of executions. |
| TOTAL_ROWS_RETURNED | bigint(20) | NO | The total number of rows returned. |
| BUCKET_0_ACCESS_COUNT | bigint(20) | NO | The number of times the index table is accessed 0 times. |
| BUCKET_1_ACCESS_COUNT | bigint(20) | NO | The number of times the index table is accessed 1 time. |
| BUCKET_2_10_ACCESS_COUNT | bigint(20) | NO | The number of times the index table is accessed 2 to 10 times. |
| BUCKET_2_10_ROWS_RETURNED | bigint(20) | NO | The number of rows returned by the index table 2 to 10 times. |
| BUCKET_11_100_ACCESS_COUNT | bigint(20) | NO | The number of times the index table is accessed 11 to 100 times. |
| BUCKET_11_100_ROWS_RETURNED | bigint(20) | NO | The number of rows returned by the index table 11 to 100 times. |
| BUCKET_101_1000_ACCESS_COUNT | bigint(20) | NO | The number of times the index table is accessed 101 to 1000 times. |
| BUCKET_101_1000_ROWS_RETURNED | bigint(20) | NO | The number of rows returned by the index table 101 to 1000 times. |
| BUCKET_1000_PLUS_ACCESS_COUNT | bigint(20) | NO | The number of times the index table is accessed more than 1000 times. |
| BUCKET_1000_PLUS_ROWS_RETURNED | bigint(20) | NO | The number of rows returned by the index table more than 1000 times. |
| LAST_USED | varchar(128) | NO | The last time the index table was used. |
Sample query
Query the usage data of indexes.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_INDEX_USAGE;