Overview
The CDB_OB_AGENT_DB_BACKGROUND_TASK_HISTORY view displays the history of all completed background deletion tasks for logical tables in all tenants.
Columns
field |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| DATABASE_NAME | varchar(128) | NO | The name of the database. |
| COLLECTION_NAME | varchar(256) | NO | The name of the collection. |
| NAMESPACE_NAME | varchar(256) | NO | Namespace name. |
| LTABLE_NAME | varchar(256) | NO | The name of the logical table.
|
| OPERATION_TYPE | varchar(32) | NO | Operation type. Valid values:
|
| OPERATION_STATUS | varchar(32) | NO | Operation status. Valid values:
|
| START_TIME | timestamp | NO | The task start time. |
| FINISH_TIME | timestamp | NO | End time of the task. |
| ELAPSED_TIME | bigint | NO | Time consumed in deleting tasks, in microseconds. |
| TOTAL_DELETED_ROWS | bigint | NO |
|
| ORIGINAL_NAME | varchar(256) | NO | Original name of the deleted object. |
| RET_CODE | varchar(512) | NO | Error code name. |
Sample query
Query the history of background deletion tasks for logical tables completed by all tenants in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_AGENT_DB_BACKGROUND_TASK_HISTORY;
A sample response is as follows:
+-----------+---------------+-----------------+----------------+--------------+----------------------+---------------------+---------------------+---------------------+---------------------+--------------------+---------------+------------+
| TENANT_ID | DATABASE_NAME | COLLECTION_NAME | NAMESPACE_NAME | LTABLE_NAME | OPERATION_TYPE | OPERATION_STATUS | START_TIME | FINISH_TIME | ELAPSED_TIME | TOTAL_DELETED_ROWS | ORIGINAL_NAME | RET_CODE |
+-----------+---------------+-----------------+----------------+--------------+----------------------+---------------------+---------------------+---------------------+---------------------+--------------------+---------------+------------+
| 1002 | test | kb | app001 | chat_history | LTABLE_DELETE | COMPLETED | 2026-06-05 10:06:00 | 2026-06-05 10:08:35 | 155000000 | 50000 | chat_history | OB_SUCCESS |
| 1002 | test | kb | ns_images | | NAMESPACE_DELETE | COMPLETED | 2026-06-05 10:10:00 | 2026-06-05 10:12:00 | 120000000 | 180000 | ns_images | OB_SUCCESS |
| 1002 | test | kb | ns_hot_cache | | HOT_NAMESPACE_EXPIRE | COMPLETED | 2026-06-05 09:00:00 | 2026-06-05 09:00:01 | 1000000 | 0 | ns_hot_cache | OB_SUCCESS |
+-----------+---------------+-----------------+----------------+--------------+----------------------+---------------------+---------------------+---------------------+---------------------+--------------------+---------------+------------+