SELECT C.ID,C.CATYPE,C.ZZBH,C.HZ,C.BFRQ,C.JZRQ,C.SAVETYPE,C.DOCID,C.FBDOCID,(CASE C.SAVETYPEWHEN '2' THEN'已签发'ELSE'未签发'END) STYPE,C.CREATOR USERID,B.BSNUM,B.SXZXNAME,B.PERMID AS SXID,B.APPNAME APPNAME,B.APPCOMPANY APPCOMPANY,B.PROJECTNAME,B.XZXK,B.DEPTID,B.BJTYPE,B.ENDFORTIME,B.DATAID DATAID,B.FLOWID,E.GROUPID,E.GROUPNAME,E.NETWORKID,E.YWGSD,B.STATUS,C.TYPE,C.CIDFROM(SELECT CI.*,DECODE(CI.CREATEDATE,NULL,'0',F.TYPE) TYPE FROM T_SHARE_CERTIFICATEINSTANCE CI LEFT JOIN T_SYS_CERTIFICATECONFIG F ON CI.CID=F.ID )C(数据量大) ,T_INS_BUSINESSINFO B,T_INS_BUSINESS_EXT EWHERE B.BSNUM = C.YWID(+)AND B.BSNUM = E.BSNUMAND B.SFCZ = '1'AND DECODE(B.STATUS,'2',DECODE(C.TYPE,'0','1','0'),B.STATUS)='1' AND( B.PERMID in(SELECT M.SXIDFROM T_FLOW_PERM M, T_FLOW_GROUP_NODE N, T_FLOW_GROUP_HANDLER HWHERE M.GID = H.GIDAND M.GID = N.GIDAND N.NODEID = H.NODEIDAND H.NODEID = 'ZZQF'AND H.HANDLER IN ('20170223144725077357', '220015988')) or b.deptid='220015988') AND nvl(C.SAVETYPE,'1')='1'因为C表 数据量太大 导致查询慢 请问怎么优化啊
添加回答
举报
0/150
提交
取消