索引:提高了查询速度,降低了增删改的速度
索引操作:
查看索引:show index from table tbname,show create table tbname
删除索引:alter table tbname drop index key1,drop index key1 from tbname
添加索引:alter table tbname add index key1(字段)
添加主键索引:alter table tbname add primary key(id)
删除主键索引:alter table tbname drop primary key