开发了一个报表,在自己电脑上预览是没有任何问题的,但是转移到服务器上预览的时候浏览器就会卡死,查看日志提示Memory is over threshold!,但是的其他报表是能够预览的
我们服务器内存是32G的,看到有人说是SQL代码的问题 ,这里把代码也附上 ,谁能给个解决办法么?
select DJH,lastname as SQR,SQRQ,FYLX, FKFS,FKLX,ZFDXQC,DYFPH,currencyname as BZ,YBJE,a.RMBJE,b1.status as LCZT
from formtable_main_20 a
left join HrmResource b
on a.SQR = b.id
left join workflow_requestbase b1
on a.requestId = b1.requestid
left join formtable_main_24_dt1 b2
on a.FPH = b2.id
left join FnaCurrency b4
on a.bz = b4.id
where ( lastname= '楼' or
lastname= '熊' or
lastname= '金' or
lastname= '张' or
lastname= '徐')
and
1=1 ${if(len(发票号码) = 0 ,"","and (DYFPH like '"+发票号码+"' or DYFPH like '"+发票号码+".%' or DYFPH like '%."+发票号码+".%' or DYFPH like '%."+发票号码+"')")}
${if(len(姓名) = 0 ,"","and lastname = '"+姓名+"'")}
${if(len(流程状态) = 0 ,"","and b1.status = '"+流程状态+"'")}
union all
select DJH,lastname as SQR,SQRQ,FYLX, FKFS,FKLX,GYSMC as ZFDXQC, DYFPH,currencyname as BZ,YBJE,a1.RMBJE,b2.status as LCZT
from formtable_main_65 a1
left join uf_gys b
on a1.ZFDXQC = b.id
left join HrmResource b1
on a1.SQR = b1.id
left join workflow_requestbase b2
on a1.requestId = b2.requestid
left join formtable_main_24_dt1 b3
on a1.FPH = b3.id
left join FnaCurrency b4
on a1.bz = b4.id
where ( lastname = '楼' or
lastname = '熊' or
lastname= '金' or
lastname= '张' or
lastname= '徐')
and
1=1 ${if(len(发票号码) = 0 ,"","and (DYFPH like '"+发票号码+"' or DYFPH like '"+发票号码+",%' or DYFPH like '%,"+发票号码+",%' or DYFPH like '%,"+发票号码+"')")}
${if(len(姓名) = 0 ,"","and lastname = '"+姓名+"'")}
${if(len(流程状态) = 0 ,"","and b2.status = '"+流程状态+"'")}