Note
This view is introduced since OceanBase Database V4.3.0.
Purpose
The DBA_INDEX_USAGE view displays the usage information of indexes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| OBJECT_ID | bigint(20) | NO | The ID of the index table. |
| NAME | varchar(128) | NO | The name of the index table. |
| OWNER | varchar(128) | NO | The name of the database. |
| 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 based on the index table. |
| BUCKET_0_ACCESS_COUNT | bigint(20) | NO | The index table has not been accessed. |
| BUCKET_1_ACCESS_COUNT | bigint(20) | NO | The index table has been accessed once. |
| BUCKET_2_10_ACCESS_COUNT | bigint(20) | NO | The index table has been accessed 2 to 10 times. |
| BUCKET_2_10_ROWS_RETURNED | bigint(20) | NO | 2 to 10 rows have been returned based on the index table. |
| BUCKET_11_100_ACCESS_COUNT | bigint(20) | NO | The index table has been accessed 11 to 100 times. |
| BUCKET_11_100_ROWS_RETURNED | bigint(20) | NO | 11 to 100 rows have been returned based on the index table. |
| BUCKET_101_1000_ACCESS_COUNT | bigint(20) | NO | The index table has been accessed 101 to 1000 times. |
| BUCKET_101_1000_ROWS_RETURNED | bigint(20) | NO | 101 to 1000 rows have been returned based on the index table. |
| BUCKET_1000_PLUS_ACCESS_COUNT | bigint(20) | NO | The index table has been accessed more than 1000 times. |
| BUCKET_1000_PLUS_ROWS_RETURNED | bigint(20) | NO | More than 1000 rows have been returned based on the index table. |
| LAST_USED | varchar(128) | NO | The time when the index table was last accessed. |
Sample query
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_INDEX_USAGE;