DML statements are normal, but DDL statements execute very slowly

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

Original topic: dml语句正常,但是DDL语句执行非常缓慢

| username: Jolyne

[TiDB Usage Environment] Production Environment / Testing / PoC
Production Environment
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
Suddenly, statements like creating tables and adding fields keep waiting and are not successful. Previously, there was an OOM issue. If a TiKV node was abnormal, the statement execution would return to normal after waiting for about 1 minute. However, currently, all nodes in the cluster are online, and the statement execution remains in a waiting state.
[Encountered Issue: Problem Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: TI表弟 | Original post link

How large is the table’s data volume?

| username: Jolyne | Original post link

It’s normal to query millions of records, but it’s not possible to create a table with just one field.

| username: TI表弟 | Original post link

Check the error log.

| username: Jolyne | Original post link

It seems to be blocked. I remember that only one DDL job can exist at the same time. It seems that there is a DDL that has always been present.

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

Yes, there are still some DDL operations that haven’t been completed yet, right?

| username: Jolyne | Original post link

:sweat_smile: Yes, someone made a mistake which caused a blockage. I used ADMIN CANCEL DDL JOBS to cancel it for them.

| username: TI表弟 | Original post link

It might be due to an unfinished transaction. You can wait and see.

| username: zhanggame1 | Original post link

DDL can only be executed one at a time; the subsequent ones will queue up and wait until the previous one is finished.

| username: yulei7633 | Original post link

You can check if there is any load on the TiKV node.

| username: Anna | Original post link

Hahaha, it was blocked. But it has already been resolved.

| username: system | Original post link

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