记录一个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. Linux之RHEL7root密码破解(二)

    破解Linux root密码的第二种方法,如下: 首先开机,进入启动界面,接着找到如下图所示的代码字段,将ro改成rw init=/sysroot/bin/sh ,如下图: 之后按“Ctrl+X”之后 ...

  2. 百度编译器ueditor插入视频的时候。在预览的窗口提示 “输入的视频地址有误,请检查后再试!

    ueditor.all.js: 搜索me.commands["insertvideo"] 把html.push(creatInsertStr( vi.url, vi.width | ...

  3. Codeforces_Round_547 (Div. 3)题解

    题目链接 传送门 A题 题目 题意 给你两个正整数\(n\)和\(m\),然后你可以进行无数次操作(每次操作可以将\(n\)扩大两倍,或者扩大三倍),问你是否能够得到\(m\). 代码实现如下 n, ...

  4. java代码获取项目版本号实例

    package com.hzcominfo.application.etl.settings.web.controller.highconfig; import com.hzcominfo.appli ...

  5. springboot 打成的jar包在ClassLoader().getResource方法读取文件为null

    1.属性文件如下: 10001=错误 2.文件读取主要代码 // getResource方式 URL resourceURI = getClass().getClassLoader().getReso ...

  6. C++报错:全局变量重定义或是多次定义

    如何在C++中定义全局变量时避免重复定义呢? 只要在定义时尽量在.cpp文件中进行,而不要在.h 文件中定义,定义好了之后,可以在.h文件中利用extern关键字进行声明. 如果在.h文件中定义的话, ...

  7. Codechef:Fibonacci Number/FN——求通项+二次剩余+bsgs

    题意 定义 $F_n$ 为 $$F_n = \left\{\begin{matrix}0, n=0\\ 1, n=1 \\F_{n-1} + F_{n-2}, n > 1\end{matrix} ...

  8. 国赛baby_pwn

    国赛baby_pwn-ret2_dl_runtime_resolve之ELF32_rel,Elf32_sym,伪造 0x01 ELF文件的动态链接之延迟绑定 在动态链接下,程序模块之间包含了大量的函数 ...

  9. 指数基金介绍专栏(4):上证50AH优选指数

    作者:牛大 | 公众号:定投五分钟 大家好,我是牛大.每天五分钟,投资你自己:坚持基金定投,终会财富自由! 想必大家会有疑问,什么是上证50AH优选指数?今天老师给大家答疑解惑,详细介绍一下上证50A ...

  10. asp.net解决大文件断点续传

    以ASP.NET Core WebAPI 作后端 API ,用 Vue 构建前端页面,用 Axios 从前端访问后端 API ,包括文件的上传和下载. 准备文件上传的API #region 文件上传  ...