The following articles mainly introduce the high-performance MySQL index policy-MySQL Clustered index (Clustered Indexes). We all know that MySQL Clustered index (Clustered Indexes ), in actual application, the proportion still occupies a certain proportion. The specific content of this article is described below.
The MySQL clustered index ensures that the physical locations of the tuples with the same keyword values are also the same. Therefore, the clustered index cannot be set up for the string type, especially the random string, which causes the system to perform a lot of moving operations ), A table can have only one clustered index. Because indexes are implemented by the storage engine, not all engines Support clustered indexes. Currently, only solidDB and InnoDB are supported.
The cluster index structure is roughly as follows:
Note: The leaf page contains the complete tuples, while the inner node page only contains the indexed columns (the indexed column is an integer type ). Some DBMS allow users to specify clustering indexes, but MySQL's storage engine does not support this so far. InnoDB creates a clustered index for the primary key. If you do not specify a primary key, InnoDB will replace it with a unique and non-null index.
If such an index does not exist, InnoDB defines a hidden primary key and creates a clustered index for it. In general, DBMS stores actual data in the form of clustered indexes, which is the basis of other secondary indexes.
The above content is an introduction to the MySQL Cluster Index. I hope you will get something better.