复合主键: create table index_test( a int not null, b int not null, c int not null, d int null, primary key (c, a, b)); 即一个表的主键同时由多个字段共同组成,复合主键索引见【Mysql】复合主键的索引。 联 复合主键: create table index_test ( a int not
索引是排好序的数据结构!可以用在 where 条件查找的字段,和order by 排序的字段,有了索引,便可以快速地定位数据所在的物理地址并找出来。 索引的分类 1.普通索引(normal):没有任何 索引是排好序的数据结构!可以用在 where 条件查找的字段,和order by 排序的字段,有了索引,便可以快速地定位数据所在的物理地址并找出来。 索引的分类 1.普通索引(normal