Storage Layout Tips In InnoDB, having a long PRIMARY KEY (either a single column with a lengthy value, or several columns that form a long composite value) wastes a lot of disk space. The primary key value for each row must be stored with each corresponding secondary index record. (See Section 13.6.10, “InnoDB Table and Index Structures”.) Create an AUTO_INCREMENT column as the primary key if your primary key is long. Use the VARCHAR data type instead of CHAR to store variable-length strings or for columns with many NULL values. A CHAR(N) column always takes N characters to store data, even if the string is shorter or its value is NULL. Smaller tables fit better in the buffer pool and reduce disk I/O. When using COMPACT row format (the default InnoDB format in MySQL 5.5) and variable-length character sets, such as utf8 or sjis, CHAR(N) columns occupy a variable amount of space, at least N bytes. 有2个疑问:
1, each corresponding secondary index record 我知道大概的意思,但是翻译成中文是啥意思?我说不上来。2,row format与the default InnoDB format in MySQL 5.5有何关系,5.5的default innodb format是啥模式?