Will this be stored on page?

2019-04-15 11:32发布

问题:

http://dev.mysql.com/doc/refman/5.7/en/innodb-row-format-dynamic.html

Can someone explain depends on the page size and the total size of the row? If I use InnoDB and keep the default settings, then create a table with 60 bytes + a MEDIUMTEXT with 10kb data, will the MEDIUMTEXT be stored on page or off page?

回答1:

If total record size is less than ~7k (exactly UNIV_PAGE_SIZE/2 - 200) than the record is stored on page, all fields including *BLOB, *TEXT.

If total record size is more than 7k than only 768 bytes of each *BLOB field values are stored on page. The remaining page of the field is stored in external pages.

In DYNAMIC format that comes with Barracuda only 20 bytes of the BLOB field are stored on page - the rest in external pages.