Creating tables is particularly slow after enabling tidb_scatter_region

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

Original topic: tidb_scatter_region开启后建表特别慢

| username: TiDBer_o0MXVuK4

After enabling tidb_scatter_region, creating a table is particularly slow, taking tens of minutes. It’s a new cluster with no business operations running.

| username: 裤衩儿飞上天 | Original post link

After enabling this parameter, I haven’t tested how many times slower table creation will be. It might also be related to cluster resources. You can upload the relevant logs to see if there are any errors or to determine exactly where the slowdown is occurring.

| username: TiDBer_o0MXVuK4 | Original post link

Five physical machines with 64 cores and 128GB each, new machines, it’s impossible that it’s related to resources. Before enabling this parameter, table creation was at the second level. After enabling it, it takes at least half an hour or even longer. Once it’s disabled, it immediately goes back to normal.

| username: 裤衩儿飞上天 | Original post link

Then don’t use this method.
You can follow the official documentation and specify shard_row_id_bits and pre_split_regions when creating the table.