MySql中“二级索引”的定义怎么样的?它和PRIMARY KEY有什么区别呢?

解决方案 »

  1.   

    http://www.cnblogs.com/hustcat/archive/2009/10/28/1591648.html
    在“3.1.1、InnoDB和MyISAM的数据布局的比较”中有提到。手册中的原文
        InnoDB does not have a special optimization for separate index creation the way the MyISAM storage engine does. Therefore, it does not pay to export and import the table and create indexes afterward. The fastest way to alter a table to InnoDB is to do the inserts directly to an InnoDB table. That is, use ALTER TABLE ... ENGINE=INNODB, or create an empty InnoDB table with identical definitions and insert the rows with INSERT INTO ... SELECT * FROM ....
        If you have UNIQUE constraints on secondary keys, you can speed up a table import by turning off the uniqueness checks temporarily
    during the import operation:                     
      

  2.   

    对应的中文版帮助内容如下。 innodb 中有CLUSTER INDEX和非CLUSTER INDEX