shibazi

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
1.myisam,bdb,innodb,memory 单表至少支持16个索引

2.create index id_index on emp (id) 为emp表创建一个名为id_index的id字段的索引

3.drop index id_index on emp 删除emp表的id_index 索引

4.explain xxxxxxx,可以查看相关的执行结果,用于优化表用

5.最合适的索引列是“条件列”,而不是“选择列”
  比如 select name from emp where year >= 2014;
  那么最好是在year字段上创建索引,而不是name字段
  
6.使用索引的字段,字段值最好是具有唯一性的,因为越具有唯一性,索引意义越大

7.btree索引通过索引访问,而hash索引则进行全表扫描

 

posted on 2014-07-07 22:35  一生学习,何来毕业  阅读(245)  评论(0编辑  收藏  举报