After executing multiple create/drop table commands in TiDB, the create table statement becomes slower

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

Original topic: tidb执行多次create/drop table之后,建表(create table)的语句变慢

| username: Holland

After executing many create/drop table commands on the 18th, the create table statements became very slow, taking about 30 seconds consistently. Creating an index also takes 3 seconds.
image
These are the DDLs executed on the 18th.


Running admin show ddl jobs 50 where SCHEMA_STATE != "public"; shows 20 jobs in the queueing state, but the STATE is all synced.

Why is this happening?

| username: Holland | Original post link

After restarting TiDB, the table creation speed returned to normal. It feels like a bug.

| username: Minorli-PingCAP | Original post link

There have been similar cases. For example: ddl: the schema state is not appropriate for some removed-type ddl · Issue #24420 · pingcap/tidb · GitHub
There are also some known issues:
PingCAP Knowledge Base

| username: Holland | Original post link

tidb v5.4.1

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.