# Insertion Hotspot Issue Resolution for Clustered Primary Key Table
+ Use **`AUTO_RANDOM`** instead of **`AUTO_INCREMENT`**

```7
tidb> CREATE TABLE test.auto_random_t1 (
  id BIGINT UNSIGNED PRIMARY KEY ~!@AUTO_RANDOM(3)@!~,
  name CHAR(255));

tidb> SHOW TABLE test.auto_random_t1 REGIONS\G

*************************** 1. row ***************************
             REGION_ID: 5005
             START_KEY: t_202_
               END_KEY: 
             LEADER_ID: 24362
       ~!@LEADER_STORE_ID: 2005@!~
                 PEERS: 24362
            SCATTERING: 0
         WRITTEN_BYTES: 12652
            READ_BYTES: 23297
  APPROXIMATE_SIZE(MB): 1
      APPROXIMATE_KEYS: 0
SCHEDULING_CONSTRAINTS: 
      SCHEDULING_STATE: 
~!@1 row@!~ in set (0.00 sec)
```
```7
tidb> ~!@SPLIT TABLE@!~ test.auto_random_t1 BETWEEN (0) 
  AND (9223372036854775807) REGIONS 16;

+--------------------+----------------------+
| TOTAL_SPLIT_REGION | SCATTER_FINISH_RATIO |
+--------------------+----------------------+
|                 15 |                    1 |
+--------------------+----------------------+

tidb> SHOW TABLE test.auto_random_t1 REGIONS\G

*************************** 1. row ***************************
             REGION_ID: 24373
             START_KEY: t_202_
               END_KEY: t_202_r_576460752303423487
             LEADER_ID: 24374
       ~!@LEADER_STORE_ID: 2005@!~
...
*************************** 16. row ***************************
             REGION_ID: 5005
             START_KEY: t_202_r_8646911284551352305
               END_KEY: 
             LEADER_ID: 24414
       ~!@LEADER_STORE_ID: 2001@!~
...
~!@16 rows@!~ in set (0.01 sec)
```

------------------------------------------------------------------------------
In this slide, you have created a clustered primary key table named `test.auto_random_t1`. The difference is that you have set the `AUTO_RANDOM` attribute on the primary key column `id`, instead of `AUTO_INCREMENT`.

You use the command `SHOW TABLE test.auto_random_t1 REGIONS\G` to verify the TiKV Region distribution of the newly created table. At the beginning, you can observe that the entire table has only one TiKV Region as well. 

Then, you use `SPLIT TABLE` command to proactively allocate 16 empty TiKV Regions within the range of 0 to 9223372036854775807 (the largest unsigned 64-bit integer, for the signed case the range is -9223372036854775808 to 9223372036854775807). The definition of columns in the output:
- `TOTAL_SPLIT_REGION` represents the count of newly split TiKV Regions.
- `SCATTER_FINISH_RATIO` represents the progress of scatter operation for newly split TiKV Regions in percentage. A value of `1` indicates that all TiKV Regions have been scattered.

Furthermore, with the `AUTO_RANDOM` attribute set on the primary key column `id`, random primary key values will be generated. As a result, when you insert data, the keys of the `key-value` pairs will land on 16 empty TiKV Region Leaders across the TiKV nodes. 