2013年12月12日

MySQL索引和优化查询

摘要: 索引和优化查询恰当的索引可以加快查询速度,可以分为四种类型:主键、唯一索引、全文索引、普通索引。主键:唯一且没有null值。create table pk_test(f1 int not null,primary key(f1));alter table customer modify id int not null, add primary key(id);普通索引:允许重复的值出现。create table tableanme (fieldname1 columntype,fieldname2 columntype,index [indexname] (fieldname1 [,field 阅读全文

posted @ 2013-12-12 11:28 imxiu 阅读(205) 评论(0) 推荐(0) 编辑

导航