Why does the state of 'admin show ddl jobs' show as done, but executing the CREATE statement takes 90 seconds?

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

Original topic: admin show ddl jobs 的state为done ? 执行CREATE语句花费90秒

| username: CAICAI

[Problem Encountered]:

When executing the create table statement, it is found that it takes about 90.192 seconds each time, which is very slow:

CREATE TABLE test.`teset`  (
  `orderId` varchar(50) NOT NULL COMMENT 'Production plan order number',
  `state` tinyint(3) NULL DEFAULT 10 COMMENT 'Status 10 not cut 20 partially cut 50 cut',
  `data` json NULL COMMENT 'Extended data',
  PRIMARY KEY (`orderId`)
) COMMENT = 'Cutting list'
> OK
> Time: 90.193s

By executing admin show ddl jobs, the following figure shows that the state is done

But according to the documentation:

There is no state of done

It feels like it waited for 90 seconds in between. Does anyone know if this is due to some incorrect configuration?

| username: 数据小黑 | Original post link

What is the deployment architecture like? Is there a load balancer in front of TiDB? How is TiDB’s load? Is the CPU usage high?

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

When TiDB completes all its Schema state changes, it will change the Job’s status to Done. This status should be before the synced status, indicating that the execution has been successful, but the other TiDB instances have not yet synchronized this status.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.