SC&KD 2022-07-25 16:23 采纳率: 12.5%
浏览 617

navicat mysql 内存占用过高,被强制关闭

navicat mysql 内存占用过高,被强制关闭

没有执行,复制sql 到查询窗口中,内存在我本地mac 直接增长到50G 提示强制关闭
Windows服务器上 内存占用到40G 提示未响应,强制关闭

代码大致有 170行左右,多数字段使用 sum(case when) 例如

sum(case when xfaqglxs=0 and sfczkryp=0 then 1 else 0 end+
case when xfaqglxs=0 and sfczwgsztcwqfhwxx in(1,2) then 1 else 0 end+
case when xfaqglxs=0 and sfczddzhcwgtfcdxx=1 then 1 else 0 end+
case when xfaqglxs=0 and xfcdxfcjycdsfszbzbpshbx=0 then 1 else 0 end+
case when xfaqglxs=0 and xfctd=1 then 1 else 0 end+
case when xfaqglxs=0 and sstdaqck=1 then 1 else 0 end+
case when xfaqglxs=0 and hzzdbjxtgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and snxhsxtgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and swxhsxtgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and zdpsmhxtgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and jxfpyxtgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and fhjlgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and qtmhxtgnqk=1 then 1 else 0 end+
case when xfaqglxs=0 and rymjcssncyrkrclzx=1 then 1 else 0 end+
case when xfaqglxs=0 and wgszqzf=1 then 1 else 0 end+
case when xfaqglxs=0 and djyrkrcgbf=1 then 1 else 0 end+
case when xfaqglxs=0 and bncjbzyhszgbyt=1 then 1 else 0 end+
case when xfaqglxs=0 and wgccjysyyrybwxp=1 then 1 else 0 end+
case when xfaqglxs=0 and zzbfyfzzbfgyssltj=1 then 1 else 0 end
)

sql 格式为

select a.xxid,a.q1-b.q1,a.q2-b.q2 from
(
select q1,q2 from xx1 group by xxid) a,
(
select q1,q2 from xx2 group by xxid
)b
where a.xxid=b.xxid

sql 执行没有问题,1秒之内能查询处结果,10字段不到
没有搜索到相关问题,发个问题
  • 写回答

2条回答 默认 最新

  • SC&KD 2022-07-25 16:40
    关注

    服务器偶尔会提升到30多G后,下降到正常的 100多M

    评论

报告相同问题?

问题事件

  • 创建了问题 7月25日

悬赏问题

  • ¥15 单纯型python实现编译报错
  • ¥15 c++2013读写oracle
  • ¥15 c++ gmssl sm2验签demo
  • ¥15 关于模的完全剩余系(关键词-数学方法)
  • ¥15 有没有人懂这个博图程序怎么写,还要跟SFB连接,真的不会,求帮助
  • ¥15 PVE8.2.7无法成功使用a5000的vGPU,什么原因
  • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
  • ¥15 安装quartus II18.1时弹出此error,怎么解决?
  • ¥15 keil官网下载psn序列号在哪
  • ¥15 想用adb命令做一个通话软件,播放录音