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是啥模式?
1, each corresponding secondary index record 我知道大概的意思,但是翻译成中文是啥意思?我说不上来。2,row format与the default InnoDB format in MySQL 5.5有何关系,5.5的default innodb format是啥模式?
解决方案 »
- yum 安装的mysql,在执行mysql_install_db时出现问题
- 安装mysql5.1无响应
- mysql表里面有部分内容存成了更gb2312,怎么转成utf8?
- 求助,同一个表,cid相同,比较字段的查询语句
- 一个令人十分不解的问题,请大家帮个忙
- 怎样才能只显示一个表中的所有字值,而不是显示整个表的结构?
- MySQL的问题
- several questions,please help me,because I am a freshman.
- sql函数问题
- 安装mysql5.7.17再命令行中输入net start mysql和mysqld --initialize都出错
- innodb plugin后的问题
- 测试mysql.Access denied for user 'ODBC'@'localhost' (using password: NO) 怎样解决?
2 mysql 5.5中默认innodb的行格式 就是 紧凑行格式
fixed
compressed
dynamic等把