Mysql联合索引实测
数据库表字段索引的建立对于数据检索的查询效率提升至关重要。
本文主要讲解联合索引建立时索引命中场景。
1、创建表
create table 't_user_role'(
id bigint(20) auto_increament,
user_id bigint(20) not null,
role_id bigint(20) not null,
createTime datetime,
primary key(id),
key 'idx_user_role_id'('user_id'
原创
2020-09-02 17:13:37 ·
144 阅读 ·
0 评论