没有执行,复制sql 到查询窗口中,内存在我本地mac 直接增长到50G 提示强制关闭
Windows服务器上 内存占用到40G 提示未响应,强制关闭
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
服务器偶尔会提升到30多G后,下降到正常的 100多M
看看内存相关参数
show global variables like '%buffer%' ;