# Schema Design Recommendations

+ Suitable for migrating tables from the original MySQL service to TiDB database
+ Creating a non-clustered table when building a table
+ Add the SHARD_ROW_ID_BITS and PRE_SPLIT_REGIONS options to the table
+ Other columns keep the original design

```
CREATE TABLE noncluster_order (
  id bigint(20) unsigned AUTO_INCREMENT NOT NULL,
  code varchar(30) NOT NULL,
  order_no varchar(200) NOT NULL DEFAULT '',
  status int(4) NOT NULL,
  cancle_flag int(4) DEFAULT NULL,
  create_user varchar(50) DEFAULT NULL,
  update_user varchar(50) DEFAULT NULL,
  create_time datetime DEFAULT NULL,
  update_time datetime DEFAULT NULL,
  PRIMARY KEY (id) NONCLUSTERED
) ENGINE=InnoDB SHARD_ROW_ID_BITS=4 PRE_SPLIT_REGIONS=3;
```

------------------------------------------------------------
Schema design recommendations

Many times we migrate from a MySQL database to a TiDB distributed database. The ID column with the AUTO_INCREMENT attribute is commonly used as the primary key in single-instance database scenario. However, using monotonically increasing IDs in distributed database scenario often results in data hot spots. In order to avoid data hot spots, you can try the following two ways to design and modify the schema

Highly compatible schemas
- Suitable for tables migrated from the original MySQL service to TiDB database
- Create non-clustered tables when building tables
- Add SHARD_ROW_ID_BITS and PRE_SPLIT_REGIONS options to the table
- Other columns keep the original design
