Overview
The CDB_INDEX_USAGE view is used to display index usage data.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | Container ID (Tenant ID) |
| OBJECT_ID | bigint(20) | NO | Index Table ID |
| NAME | varchar(128) | NO | Index Table Name |
| OWNER | varchar(128) | NO | Database Name |
| TOTAL_ACCESS_COUNT | bigint(20) | NO | Total Accesses |
| TOTAL_EXEC_COUNT | bigint(20) | NO | Total Executions |
| TOTAL_ROWS_RETURNED | bigint(20) | NO | Total Number of Rows Returned in Index Table |
| BUCKET_0_ACCESS_COUNT | bigint(20) | NO | The index table has been used 0 times. |
| BUCKET_1_ACCESS_COUNT | bigint(20) | NO | The index table is referenced once. |
| BUCKET_2_10_ACCESS_COUNT | bigint(20) | NO | The index table is used 2 to 10 times. |
| BUCKET_2_10_ROWS_RETURNED | bigint(20) | NO | The index table returns 2 to 10 rows. |
| BUCKET_11_100_ACCESS_COUNT | bigint(20) | NO | Index table access 11 to 100 times |
| BUCKET_11_100_ROWS_RETURNED | bigint(20) | NO | The index table returns 11 to 100 rows. |
| BUCKET_101_1000_ACCESS_COUNT | bigint(20) | NO | Index table access 101 to 1,000 times |
| BUCKET_101_1000_ROWS_RETURNED | bigint(20) | NO | The index table returns rows 101 to 1000. |
| BUCKET_1000_PLUS_ACCESS_COUNT | bigint(20) | NO | The index table has been used more than 1,000 times. |
| BUCKET_1000_PLUS_ROWS_RETURNED | bigint(20) | NO | The index table returns more than 1,000 rows. |
| LAST_USED | varchar(128) | NO | Last Used Time of Index Table |
Sample query
Query index usage data.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_INDEX_USAGE;