MySQL:什么是页面?

标签 mysql database innodb

在 MySQL 数据库的上下文中,我一生都无法记住页面是什么。当我看到像 8KB/page 这样的内容时,这意味着每行 8KB 还是...?

最佳答案

数据库页面是组织数据库文件中数据的内部基本结构。以下是有关 InnoDB 模型的一些信息:

来自 13.2.11.2. File Space Management :

The data files that you define in the configuration file form the InnoDB tablespace. The files are logically concatenated to form the tablespace. [...] The tablespace consists of database pages with a default size of 16KB. The pages are grouped into extents of size 1MB (64 consecutive pages). The “files” inside a tablespace are called segments in InnoDB.

来自 13.2.14. Restrictions on InnoDB Tables

The default database page size in InnoDB is 16KB. By recompiling the code, you can set it to values ranging from 8KB to 64KB.

进一步,将 rowspages 相关联:

The maximum row length, except for variable-length columns (VARBINARY, VARCHAR, BLOB and TEXT), is slightly less than half of a database page. That is, the maximum row length is about 8000 bytes. LONGBLOB and LONGTEXT columns must be less than 4GB, and the total row length, including BLOB and TEXT columns, must be less than 4GB.

关于MySQL:什么是页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4401910/

相关文章:

mysql添加表时出错所以脚本

mysql - InnoDB 复合索引顺序和 INSERT 性能

Mysql CHECKSUM TABLE 不适用于 ndbcluster

mysql - 亿级表优化查询

PHP解析YAML,存储在DB中以便于修改值,然后返回原始结构

MySQL:重命名 auto_increment 列时遇到问题

Mysql 搜索 - InnoDB 和事务与 MyISAM 的全文搜索

MySQL "INSERT INTO SELECT NOT EXISTS"效率

java - 如何在java中获得某些精度值?

mysql - 计算出现次数最多的字符串