--增加index类型索引
CREATE INDEX 索引名称 ON 表(索引字段);
--增加UNIQUE类型索引
CREATE UNIQUE INDEX 索引名称 ON 表(索引字段);
(给两个字段加相同的索引)例如:
CREATE UNIQUE INDEX group_user_UNIQUE ON pmph_group_member(group_id,user_id);
查看索引:
show index from tblname;
show keys from tblname;