首页 > 数据库技术 > 详细

mysql索引之普通索引

时间:2015-09-15 11:05:32      阅读:141      评论:0      收藏:0      [点我收藏+]

1,普通索引的创建

  普通索引可以在建表的时候创建 sql :

create table temp2(id int(10) not null auto_increment ,title varchar(10) not null, content varchar(10) not null,primary key (`id`),index(title,content)) engine = MYISAM;

2,sql :

alter table temp2 add index title (title);

3,sql :

  create index title on temp2(title);

删除索引

  drop index title on temp2;

查看索引

  show index from temp2;

 

普通索引的使用方式,一般在对筛选条件比较多的where后的字段建立索引,但是索引会影响数据的插入更新速度,

mysql索引之普通索引

原文:http://www.cnblogs.com/dreamword/p/4809372.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!