Background information
After you archive data in the source database to the destination database, OceanBase Developer Center (ODC) allows you to delete the data from the source database to improve the query performance and reduce the online storage costs.
This topic describes how to clean up archived data by submitting a ticket.
Prerequisites
- The table to be cleaned up has a primary key.
Create a data cleanup task
Example: Clean up the student table in the odc_test database.
| Parameter | Example value |
|---|---|
| Data source | mysql_4.2.0 |
| Source database name | odc_test |
| Table name | student |
On the Ticket tab in the left-side navigation pane of the homepage, click Data Cleanup and then click New Data Cleanup.

On the Create Data Cleanup Task page, configure the following parameters.

Parameter Description Source Database The database to which the table belongs. Variable Configuration Optional. You can define variables and set time offsets to filter rows to be cleaned up. Cleanup Scope - Partially Cleaned: specifies to clean up only tables that meet filtering conditions in the database.
You can configure filtering conditions by using constants or referencing variables defined in Variable Configuration. For example, increate<'${create_time}',create_timeis the name of a variable configured in Variable Configuration andcreateis a field in the table to be archived. - Whole Library Cleaning: specifies to clean up all tables in the database.
Execution Mode The execution mode of the task. Valid values: Execute Now, Scheduled Execution, and Periodic Execution. Remarks Optional. Additional information about the task, which cannot exceed 200 characters in length. - Partially Cleaned: specifies to clean up only tables that meet filtering conditions in the database.
Click Create.
After the task is generated, choose Ticket > Data Cleanup to view the task.
View a data cleanup task
Task information
In the data cleanup task list on the Task Center page, click View in the Actions column of a task.
On the task details panel that appears, click the Task Information tab and view information such as the task type, source database, destination database, variable configurations, archiving scope, and execution mode.
Task process
On the task details panel, click the Task Process tab and view information such as the task initiation status, approval status, execution status, execution result.
Execution records
On the task details panel, click the Execution Records tab and view task status and perform operations such as task retry and rollback.
Task logs
On the task details panel, click the Operating Records tab and view the approval status and records of the task.