记录一个bug情况:

我有个表NewTable,复合主键(slaveid,resid,owner)

CREATE TABLE "public"."NewTable" (
"slaveid" varchar() NOT NULL,
"resid" varchar() NOT NULL,
"owner" varchar(2) NOT NULL,
"a" bool,
"b" int4,
"c" text,
"ddd" varchar(),
"e" timestamp(),
"f" timestamp(),
PRIMARY KEY ("owner", "resid", "slaveid")
)
WITH (OIDS=FALSE)
;

存数据进去的时候,slaveid,resid,owner三个字段都特别长,达到几万字节,其他字段长度的只有几十

那么问题来了,当入参足够长的时候,会报错如下

[Err] ERROR:  index row size  exceeds maximum  for index "pk_t_portal_slave_extend"
HINT: Values larger than / of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.

原因:报错说 超过缓存1/3大小就不予检索,也就是说

length(slaveid + resid +owner) / length(所有入参字节总和)  > 1/3

则认为主键长度太大,就数据库就放弃检索复合主键是否唯一,就报错不处理了。

解决办法,正在尝试,参看:

Consider a function index of an MD5 hash of the value, or use full text indexing.

index row size 2720 exceeds maximum 2712 for index "xxx" ,Values larger than 1/3 of a buffer page cannot be indexed.的更多相关文章

  1. Limits on Table Column Count and Row Size Databases and Tables Table Size 最大行数

    MySQL :: MySQL 8.0 Reference Manual :: C.10.4 Limits on Table Column Count and Row Size https://dev. ...

  2. mysql 1709: Index column size too large. The maximum column size is 767 bytes.

    1709: Index column size too large. The maximum column size is 767 bytes. 修改排序规则解决 utf8_general_ci

  3. Index column size too large. The maximum column size is 767 bytes.

    mysql建表时报Index column size too large. The maximum column size is 767 bytes.解决办法:在建表语句的后面加入:ENGINE=In ...

  4. ERROR 1709 (HY000): Index column size too large. The maximum column size is 767 bytes.

    MySQL版本5.6.35 在一个长度为512字符的字段上创建unique key报错 CREATE DATABASE dpcs_metadata DEFAULT CHARACTER SET utf8 ...

  5. 【bug】 1118 Row size too large

    1118 Row size too large Every table (regardless of storage engine) has a maximum row size of 65,535 ...

  6. mysql row size上限

    mysql innodb 的 row size上限 背景 在项目使用中,出现了以下报错: Error Code: 1118 - Row size too large (> 8126). Chan ...

  7. mysql 报Row size too large 65535 原因与解决方法

    报错信息:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 ...

  8. Mysql_大字段问题Row size too large.....not counting BLOBs, is 8126.

    [问题描述] 1.从myslq(5.7.19-0ubuntu0.16.04.1)中导出sql脚本,导入到mysql(5.5.27)中,报如下错误:Row size too large. The max ...

  9. FAIL - Deploy Upload Failed, Exception: [org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (112503036) exceeds the configured

    Message:  FAIL - Deploy Upload Failed, Exception: [org.apache.tomcat.util.http.fileupload.FileUpload ...

随机推荐

  1. JAVA-JNI调用使用

    准备工作: 1.打开eclipse,新建c++项目,编写c++ jni接口如下图: 2.编译运行生成dll文件,导入到java项目,在java中创建调用使用,如下图: C文件定义: 头文件 /* DO ...

  2. Python标准库-数字的处理函数(math模块)

    Python标准库-数字的处理函数(math模块) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. #!/usr/bin/env python #_*_conding:utf-8_* ...

  3. PostgreSQL数据库安装

    PostgreSQL数据库安装 postgresqllinux9.6.0 2018年01月31日 10时53分13秒 编译以及安装 源码编译 程序安装 数据库的启动和停止 启动数据库 关闭数据库 数据 ...

  4. VUE之路

    最近研究了下Vue这个前端框架,不得不说这个前端框架很是厉害.不过对于习惯了jQuery的我来说,刚上手那会儿还是踩了很多的坑啊.那会儿觉得天啊,这个Vue框架特别的绕,并且也更复杂.不过待我写了几天 ...

  5. [转]windows10下安装与激活rational rose 2003

    Rational Rose2003安装+激活教程(Win10)(另附安装包+激活软件) 原文链接:https://blog.csdn.net/qq_38388811/article/details/8 ...

  6. LeetCode 875. Koko Eating Bananas

    原题链接在这里:https://leetcode.com/problems/koko-eating-bananas/ 题目: Koko loves to eat bananas.  There are ...

  7. Highcharts error #16: www.highcharts.com/errors/16 js 单例

    一.问题项目某一个页面用的highcharts用来显示一张图表,第一次刷新正常,第二次就出来这个错.1二.解决问题过程在网上找了很多同样是这个错误的解决方案. 第一:加载了highstock.js然后 ...

  8. Java web开发——文件夹的上传和下载

    我们平时经常做的是上传文件,上传文件夹与上传文件类似,但也有一些不同之处,这次做了上传文件夹就记录下以备后用. 这次项目的需求: 支持大文件的上传和续传,要求续传支持所有浏览器,包括ie6,ie7,i ...

  9. git的搭建和使用

    目录: 1.git与github介绍2.下载安装Git-20-64-bit.exe3.Git常用命令 git与github介绍 Git是什么 Git是一个开源的[分布式][版本控制系统],用于敏捷高效 ...

  10. hibernate之多对多关系

    hibernate的多对多hibernate可以直接映射多对多关联关系(看作两个一对多) 下面我们拿三张表来做实例 t_book_hb t_book_category_hb(桥接表) t_catego ...