MYSQL-如何解决66 KB的行大小限制 [英] MYSQL - How to workaround the row size limit of 66 KBytes

查看:170
本文介绍了MYSQL-如何解决66 KB的行大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个mysql数据库.我使用innodb.我表的0ne包含多于10列.最后一列的类型为LONGTEXT,应该包含html代码.问题是,对于每条记录,该字段都不会填充完整的代码,并且它总是在相同数量的字符后停止.我尝试插入的html文件的重量约为60KO.所以我想我的每条记录都超过了mysql(66KO)的行大小限制.我想知道的是,是否有一些方法可以扩大这一限制.任何解决方法将不胜感激.在此先感谢您的投入.干杯.马克

I have a mysql db. I use innodb. 0ne of my tables contains a little more than 10 columns. The last column has a type of LONGTEXT and it is supposed to contain html code. The problem is, for each record, that field does not conatin the full code and it stops always after the same amount of characters. The weight of the html files I try to insert is around 60KO. So I guess each of my record exceeds the row size limit of mysql (66KO). What I would like to know is if there are some ways to extand that limit. Any workaround would be much appreciated. Thanks in advance for the inputs. Cheers. Marc

推荐答案

无法扩展此限制,因为它不依赖于存储引擎,而是一个

There is no way to extend this limit, as it is not dependent on the storage engine but it is a hard limit on the server:

每个表(与存储引擎无关)的最大行大小为 65,535字节.存储引擎可能对此施加其他约束 限制,以减少有效的最大行大小.

Every table (regardless of storage engine) has a maximum row size of 65,535 bytes. Storage engines may place additional constraints on this limit, reducing the effective maximum row size.

在这种情况下,解决方案应围绕将HTML存储推迟到文件系统或云(S3)上的其他位置,然后在表列中引用文件名.

In this case the solutions should revolve around deferring the storage of HTML to some other place - on the filesystem or on the cloud (S3) and then refer to the file name in the table column.

这篇关于MYSQL-如何解决66 KB的行大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆