现在的位置: 首页 > 综合 > 正文

InnoDB的Primary Key不易过大

2013年11月27日 ⁄ 综合 ⁄ 共 465字 ⁄ 字号 评论关闭

InnoDB tables are built on a clustered index, which we will cover in detail in
Chapter 3. InnoDB’s index structures are very different from those of most other
MySQL storage engines. As a result, it provides very fast primary key lookups. How-
ever, secondary indexes (indexes that aren’t the primary key) contain the primary key
columns, so if your primary key is large, other indexes will also be large. You should
strive for a small primary key if you’ll have many indexes on a table. InnoDB doesn’t
compress its indexes.

~~《High Performance MySQL》 page 43

抱歉!评论已关闭.