mysql innodb row_format_INNODB物理行结构(ROW_FORMAT=COMPACT) | 学步园

Each index record contains a five-byte header that may be preceded by a variable-length header. The header is used to link together consecutive records, and also in row-level locking.

每个索引记录包含一个五字节的头,在它之前还有一个变长的头。这个头是用来连接连续的记录,也用于行级锁。

The record header contains a bit vector for indicating NULL columns. The bit vector occupies (n_nullable+7)/8 bytes. Columns that are NULL will not occupy other space than the bit in this vector.

记录头包含一个位向量,用来指明空列。位向量占用了(可空的列数+7)/8字节。值为空的列不会再占用此位向量以外的空间。

For each non-NULL variable-length field, the record header contains the length of the column in one or two bytes. Two bytes will only be needed if part of the column is stored externally or the maximum length exceeds 255 bytes and the actual length exceeds 127 bytes.

对于每个非空的变长字段,记录头使用一或两个字节包含了列的长度。只有如下情况才会用到两个字节:字段的值保存在外部;或者字段的最大长度走过了255,并且实际的字段值超过了127字节。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值