当前位置:网站首页>MySQL InnoDB data length limit per row
MySQL InnoDB data length limit per row
2022-06-29 10:27:00 【A ray of sunshine a】
In use today MySQL innodb when ,create table when , Report such an error :
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
Look up MySQL The official data of , Each record has a maximum length of .MySQL Official documents of :
link :https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html#row-size-limits

stay MySQL innodb in , All the data is page by page (page) To operate the , One page 16KB( default ), use B+ Tree as index ,B+ Every node in the tree is 16KB, Store data in each leaf node at the bottom , Take the primary key index as an example , If each leaf node is 16KB, Then one row of data exceeds 16KB when , There will be row overflow , Overflow data is put into another page in , namely uncompresse blob page
But in B+ In the tree , Every leaf node page At least 2 Row data , Otherwise it will lose its meaning . Then the length of a row of data is less than 8KB, The length of data in a row exceeds 8KB when ,innodb The rest of the data will be written out to another overflow page , Before the column 768 Bytes are stored in this page , At the same time, there is an offset pointing to the overflow page .
The official solution :
1. Split vertical table fields or merge large fields ( The maximum number of large fields is 768, Business merger + Split )
2. Modify the storage engine of the table ,modify InnoDB to MyISAM.
3. modify row_format by COMPRESSED perhaps DYNAMIC, Of course, the premise is to guarantee innodb_file_format =Barracuda.
边栏推荐
- Talk about threads and concurrency
- Alibaba cloud firewall configuration, multiple settings (iptables and firewall)
- [51nod 1215] array width
- SeaweedFS安全配置(Security Configuration)
- JNI.h说明
- The Stones Game【取石子博弈 & 思维】
- PGP在加密技术中的应用
- 《CLR via C#》读书笔记-加载与AppDomain
- 任务调度器之Azkaban的使用
- Application of Pgp in encryption technology
猜你喜欢
随机推荐
函数指针、函数指针数组、计算器+转移表等归纳总结
1147 heaps (30 points)
Signal works: time varying and time invariant
1099 Build A Binary Search Tree (30 分)
Seaweedfs security configuration
Reverse thinking - short story
Web漏洞手动检测分析
2019.10.27 training summary
1021 deep root (25 points)
C#使用WinExec调用exe程序
September 21, 2020 referer string segmentation boost gateway code organization level
This open source project is super wow, and handwritten photos are generated Online
Ural1517 freedom of choice [suffix array: longest common continuous substring]
C#中IEqualityComparer接口的实现
任务调度器之Azkaban的使用
2019-11-10 training summary
L1-009 sum of N numbers (20 points)
查看CSDN的博客排名
Shanke's C language 2018 exercise (Telecom)
Text of the basic component of the shutter








