Is there a way to clean up the data in the INFORMATION_SCHEMA.DDL_JOBS table?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: INFORMATION_SCHEMA.DDL_JOBS 表中数据是否有办法清理

| username: Yuld

[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.

| username: xfworld | Original post link

Look here:
https://docs.pingcap.com/zh/tidb/stable/sql-statement-admin-cancel-ddl#admin-cancel-ddl

| username: shigp_TIDBER | Original post link

ADMIN CANCEL DDL JOBS job_id [, job_id] …;

| username: Yuld | Original post link

This is to cancel the execution of DDL, not to delete the data in the DDL_JOBS table, right?

| username: 啦啦啦啦啦 | Original post link

This records the full DDL task information, it should not be deletable. Does using admin show ddl jobs also cause memory to explode?

| username: DBAER | Original post link

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?

| username: tidb菜鸟一只 | Original post link

Executing ADMIN SHOW DDL JOBS normally only displays the first 10 rows and will not cause an OOM (Out of Memory) issue.