# Hotspot of Nonclustered Index

```
CREATE TABLE sbtest1(
 id int(11) NOT NULL AUTO_INCREMENT,
 k int(11) NOT NULL DEFAULT '0',
 c char(120) NOT NULL DEFAULT '',
 pad CHAR(60) DEFAULT '' NOT NULL,
 PRIMARY KEY (id) ~!@NONCLUSTERED@!~
)
CREATE TABLE sbtest2(
 id int(11) NOT NULL,
 k int(11) NOT NULL DEFAULT '0',
 c char(120) NOT NULL DEFAULT '',
 pad CHAR(60) DEFAULT '' NOT NULL,
 PRIMARY KEY (id) ~!@NONCLUSTERED@!~
)
CREATE TABLE sbtest3(
 id int(11) NOT NULL,
 k int(11) NOT NULL DEFAULT '0',
 c char(120) NOT NULL DEFAULT '',
 pad CHAR(60) DEFAULT '' NOT NULL,
 ~!@NONCLUSTERED@!~
)
```

----------------------------------------------------
Generally, we may create Nonclustered Index Tables using three different approaches, as shown below:
1. Creating a Nonclustered Index Table with an AUTO_INCREMENT primary key:
```
CREATE TABLE sbtest1(
 id int(11) NOT NULL AUTO_INCREMENT,
 k int(11) NOT NULL DEFAULT '0',
 c char(120) NOT NULL DEFAULT '',
 pad CHAR(60) DEFAULT '' NOT NULL,
 PRIMARY KEY (id) NONCLUSTERED
);
```
2. Creating a Nonclustered Index Table without an AUTO_INCREMENT primary key:
```
CREATE TABLE sbtest2(
 id int(11) NOT NULL,
 k int(11) NOT NULL DEFAULT '0',
 c char(120) NOT NULL DEFAULT '',
 pad CHAR(60) DEFAULT '' NOT NULL,
 PRIMARY KEY (id) NONCLUSTERED
);
```
3. Creating a Nonclustered Index Table without a primary key:
```
CREATE TABLE sbtest3(
 id int(11) NOT NULL,
 k int(11) NOT NULL DEFAULT '0',
 c char(120) NOT NULL DEFAULT '',
 pad CHAR(60) DEFAULT '' NOT NULL,
 NONCLUSTERED
);
```
Based on our understanding of the key-value structure of Nonclustered Index Tables, regardless of whether the tables have a defined primary key column or an AUTO_INCREMENT primary key column, the Key in the key-value structure for sbtest1, sbtest2, and sbtest3 is formed as "Table ID_system-generated RowID". If there are no limitations on the "system-generated RowID", it will be generated according to an incremental rule. Each time a row is inserted, the "system-generated RowID" value will be incremented by 1, resulting in an incremented key in the key-value structure.