首页 > 其他分享 >[err] 1118 Row size too large.

[err] 1118 Row size too large.

时间:2023-08-03 20:02:28浏览次数:41  
标签:err maximum large InnoDB too table size columns row

 

 

一个工单表字段多+个别字段使用较长(上千) varchar,导致err 1118 

解决是将这些超长varchar 转换为 text ,注意 MBG 生成的mapper 会有变化

这种业务数据量逐年增长,表字段不断增加。可采取冷热数据分离(横向分表,业务分隔),业务字段分离(纵向分表,关联查询)

 

https://dev.mysql.com/doc/refman/5.7/en/column-count-limit.html

Column Count Limits

MySQL has hard limit of 4096 columns per table, but the effective maximum may be less for a given table. The exact column limit depends on several factors:

  • The maximum row size for a table constrains the number (and possibly size) of columns because the total length of all columns cannot exceed this size. See Row Size Limits.

  • The storage requirements of individual columns constrain the number of columns that fit within a given maximum row size. Storage requirements for some data types depend on factors such as storage engine, storage format, and character set. See Section 11.7, “Data Type Storage Requirements”.

  • Storage engines may impose additional restrictions that limit table column count. For example, InnoDB has a limit of 1017 columns per table. See Section 14.23, “InnoDB Limits”. For information about other storage engines, see Chapter 15, Alternative Storage Engines.

  • Each table has an .frm file that contains the table definition. The definition affects the content of this file in ways that may affect the number of columns permitted in the table. See Limits Imposed by .frm File Structure.

Row Size Limits

The maximum row size for a given table is determined by several factors:

  • The internal representation of a MySQL table has a maximum row size limit of 65,535 bytes, even if the storage engine is capable of supporting larger rows. BLOB and TEXT columns only contribute 9 to 12 bytes toward the row size limit because their contents are stored separately from the rest of the row.

  • The maximum row size for an InnoDB table, which applies to data stored locally within a database page, is slightly less than half a page for 4KB, 8KB, 16KB, and 32KB innodb_page_size settings. For example, the maximum row size is slightly less than 8KB for the default 16KB InnoDB page size. For 64KB pages, the maximum row size is slightly less than 16KB. See Section 14.23, “InnoDB Limits”.

    If a row containing variable-length columns exceeds the InnoDB maximum row size, InnoDB selects variable-length columns for external off-page storage until the row fits within the InnoDB row size limit. The amount of data stored locally for variable-length columns that are stored off-page differs by row format. For more information, see Section 14.11, “InnoDB Row Formats”.

  • Different storage formats use different amounts of page header and trailer data, which affects the amount of storage available for rows.

标签:err,maximum,large,InnoDB,too,table,size,columns,row
From: https://www.cnblogs.com/zno2/p/17096161.html

相关文章

  • [async]子线程内开启协程 RuntimeError: There is no current event loop in thread '
    在子线程内直接获取事件循环会报错:RuntimeError:Thereisnocurrenteventloopinthread'Thread-2',此时的代码为:loop=asyncio.get_event_loop()loop.run_until_complete(协程函数) #执行解决方法:在子线程内创建并配置事件循环new_loop=asyncio.new_event_loop(......
  • pyppeteer异常:ValueError: signal only works in main thread
    当在子线程中调用pyppeteer工具的时候,会报错:ValueError:signalonlyworksinmainthread。解决方案:在创建浏览器对象时,加上以下三个字段: ......
  • 遇到:ValueError: not enough values to unpack (expected 2, got 1) 错误应该如何解决
    遇到"ValueError:notenoughvaluestounpack(expected2,got1)"错误时,通常是因为你在尝试解包(unpack)一个包含不足两个值的可迭代对象。要解决这个问题,你可以考虑以下几个步骤:检查可迭代对象的长度:确保你的可迭代对象包含至少两个值。如果你的可迭代对象只有一个值,那么解包......
  • gitlab 报错error: 20667 bytes of body are still expectedB fatal: early EOF
    报错如下:C:\Users\meiktv\StudioProjects\meiktv_android_vod_3>gitclonehttps://gitlab.meiktv.com/client/meiktv_android_vod.gitCloninginto'meiktv_android_vod'...remote:Enumeratingobjects:46631,done.remote:Countingobjects:100%(26......
  • cocoapi-pycocotools使用
    cocoapi-pycocotools使用安装pipinstallpycocotools==2.0.0orpipinstallpycocotools-windowsfrompycocotools.cocoimportCOCO函数和说明#这个文件实现了访问COCO数据集的接口.可以进行COCO标注信息的加载,解析和可视化操作classCOCO:#用于加载COCO标......
  • vuetools的安装
    1、下载源码https://gitcode.net/mirrors/vuejs/vue-devtools/-/tree/master2、npminstall如果慢,就加上镜像npminstall--registry=https://registry.npm.taobao.org遇到的问题1:‘cross-env’不是内部或外部命令,也不是可运行的程序或批处理文件。解决1:cnpmicross-en......
  • git 操作之摘樱桃cherry-pick
    原文链接:https://www.cnblogs.com/qianqiang0703/p/14369780.html应用场景:A分支有选择的合并B分支的提交1.在B分支(feat-pratice)上修改,并添加到本地仓库2.切换到A分支(develop)开始合并注意:合并过来的时候会报错,基本就是合并冲突,去找对应的位置,手动解决下冲突。再......
  • v_jstools js逆向分析工具
    1.工具地址:https://github.com/cilame/v_jstools2.下载文件文件下载下来以后,复制到桌面,然后解压到当前文件夹,会看到一个  v_jstools-main 的文件夹。3.插件安装谷歌浏览器地址栏输入如下url,打开扩展程序页面,并打开开发者模式:chrome://extensions/打开后,点击......
  • 【Ue4】Ue4打包安卓报错 error: cannot find symbol. 以及打包日志乱码
    本地环境:ue4.26.2androidStudio4.0ndk21.4.7075529jdk1.8.0_77报错日志:或者日志乱码的话,把电脑首选语言改成英语就行了,简单粗暴;重点讲一下安卓打包报错的问题。解决过程:重启电脑重装epic和ue4引擎重装ndk、buildTools重装jdk、降级jdk版本重装AndroidStudio删除......
  • Terraform Backend 配置
    TerraformBackend配置Backend配置Backend简介StateTerraform可以根据state跟踪托管资源,默认文件存储在本地(local),可以使用backend{}定义远程的存储(remote)。terraform.tfstateterraform.tfstate.backup{"version":4,"terraform_version":"1.1.9","seri......