Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: INFORMATION_SCHEMA.DDL_JOBS 表中数据是否有办法清理
[TiDB Usage Environment] All environments
[TiDB Version] v5.4 v6.5
[Reproduction Path] select count(*) from INFORMATION_SCHEMA.DDL_JOBS;
[Encountered Problem: Problem Phenomenon and Impact] There are too many data records in the DDL_JOBS table, and I would like to ask if there is a way to clean up the data in this table.
ADMIN CANCEL DDL JOBS job_id [, job_id] …;
This is to cancel the execution of DDL, not to delete the data in the DDL_JOBS table, right?
This records the full DDL task information, it should not be deletable. Does using admin show ddl jobs
also cause memory to explode?
Normally, this is a log table that records DDL operations. Are you sure the query causes an OOM? Is it this SQL that caused it?
Executing ADMIN SHOW DDL JOBS normally only displays the first 10 rows and will not cause an OOM (Out of Memory) issue.