How to Pre-create N Regions When Creating an Empty Clustered Table

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

Original topic: 聚簇表如何在创建空表时,提前新建出N个region

| username: 近墨者zyl

When creating a clustered table with create table, how can N regions be initialized to avoid hotspot regions during data initialization?

| username: xfworld | Original post link

If a clustered index is set, it will automatically disperse hotspots by default. However, the prerequisite is that the dispersion value must be set sufficiently. You can test it more in the local environment.

| username: 大鱼海棠 | Original post link

| username: 大鱼海棠 | Original post link

For hot issues, you can refer to the documentation on the usage scenarios of clustered indexes. PRE_SPLIT_REGIONS does not take effect on clustered index tables.

| username: alfred | Original post link

Clustered tables usually design the primary key id as auto_random, which should not support pre-initializing regions.

| username: OnTheRoad | Original post link

Non-clustered tables can pre-split Regions as follows:

AUTO_RANDOM clustered tables will automatically scatter data to avoid hotspots.

| username: 近墨者zyl | Original post link

Clustered use split region :grinning:

| username: alfred | Original post link

:+1:, split the region before writing data after creating the empty table.

| username: system | Original post link

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