在 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.
进一步,将 rows 与 pages 相关联:
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/