Creating Tables in TiDB is Very Slow

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

Original topic: Tidb 建表很慢

| username: 奋斗的大象

Creating tables is very slow.

| username: h5n1 | Original post link

admin show ddl jobs to check

| username: Billmay表妹 | Original post link

Provide more information to take a look.

| username: 奋斗的大象 | Original post link

In a queue of 100 processes

| username: ShawnYan | Original post link

Please provide the specific results of admin show ddl jobs. Are there 100 table creation statements in the queue?

| username: TIDB-Learner | Original post link

In specific contexts, describing the problem, analyzing the problem, and solving the problem by guessing what the other person is thinking is difficult. In the TiDB community, experts also first analyze various possibilities regardless of the situation, and sometimes it’s just a matter of luck, like a blind cat catching a dead mouse.

| username: 有猫万事足 | Original post link

Either provide logs or provide monitoring information.
If you ask in such a general way, we can only make a wild guess.

| username: tony5413 | Original post link

Is it queue waiting? The information provided is not detailed.

| username: YuchongXU | Original post link

How is the host performance?

| username: xiaoqiao | Original post link

More information…

| username: Soysauce520 | Original post link

Are the 100 processes purely for creating tables, or do they include operations like adding indexes and expanding fields?

| username: zhaokede | Original post link

Logs or more information are needed for analysis and troubleshooting.

| username: xfworld | Original post link

How slow is creating a table? Show the graph.

| username: yulei7633 | Original post link

Check if there is a DDL queue.

| username: zhang_2023 | Original post link

Provide more detailed information.

| username: kelvin | Original post link

Provide more detailed information.

| username: TiDBer_QYr0vohO | Original post link

More detailed information

| username: Hacker_PtIIxHC1 | Original post link

You can also check whether the machine performance of TiDB and TiKV has reached its limit.

| username: 随便改个用户名 | Original post link

Are there many partitions? Creating a table can be slower when there are many partitions compared to normal.

| username: 友利奈绪 | Original post link

Provide more information to take a look.