时间:2021-07-01 10:21:17 帮助过:11人阅读
这个可以加到insert、delete、update、select的后面来使用(和rule的用法差不多,有机会再分享rule的用法)
开启parallel功能的语句是:
alter session enable parallel dml;
这个语句是DML语句哦,如果在程序中用,用execute的方法打开。
SELECT /*+ parallel(PZFL,3) parallel(PZK,3) parallel(TRAN,3) */ PZK.JSPZK_PZNM PZNM, PZK.JSPZK_JGBH JGBH, PZFL.JSPZFL_ZY FLZY, PZK.JSPZK_REVER_DATE CMRQ, (SELECT T.CUST_NAME FROM CUST_CORP_INFO T WHERE T.CUST_CODE = PZFL.JSPZFL_DWBH) CUSTNAME, KHXX.cust_code CUSTID, (SELECT F_JGMC FROM LSJGZD WHERE F_JGBH = PZK.JSPZK_JGBH) JGMC, PZK.JSPZK_BZ ZY, DECODE(PZK.JSPZK_BSNS_SRC, ‘10‘, ‘10‘, ‘11‘) BSNSSOURCE, PZK.JSPZK_PZRQ PZRQ, PZK.JSPZK_START_ACCUAL_DATE QXRQ, PZK.JSPZK_PZSJ PZSJ, PZK.JSPZK_PZBH PZBH, PZK.JSPZK_PZLX PZLX, PZFL.JSPZFL_ZHBH ZHBH, PZFL.JSPZFL_KMBH KMBH, DECODE(JSPZFL_JZFX, ‘1‘, JSPZFL_JE, 0) JFFS, DECODE(JSPZFL_JZFX, ‘2‘, JSPZFL_JE, 0) DFFS, DECODE(KMZD.F_YEFX, 2, PZFL.JSPZFL_BAL * (-1), PZFL.JSPZFL_BAL) ZHDQYE, DECODE(KMZD.F_YEFX, 2, NVL(PZFL.JSPZFL_FUNDSPOOL_BAL, 0) * (-1), NVL(PZFL.JSPZFL_FUNDSPOOL_BAL, 0)) DQSCYE, KMZD.F_YEFX YEFX, KMZD.F_KMMC KMMC, (SELECT F_WBMC FROM LSWBZD WHERE F_WBBH = PZFL.JSPZFL_BZ) WBMC, TRAN.BUSI_TRAC_CODE YW, DECODE(PZK.JSPZK_KMACCFLAG, ‘1‘, ‘已记账‘, ‘0‘, ‘未记账‘) KMACCFLAG, PZFL.JSPZFL_ZHMC MC, PZK.JSPZK_DJBH DJBH, PZK.JSPZK_PZBZ PZBZ, PZK.JSPZK_JZBZ JZBZ, (SELECT F_NAME FROM LSGYZD WHERE F_GYBH(+) = PZK.JSPZK_ZDR) ZDR, (SELECT F_NAME FROM LSGYZD WHERE F_GYBH(+) = PZK.JSPZK_JZR) JZR, PZK.JSPZK_SGPZNM SGPZH , PZFL.JSPZFL_OPP_NAME OPPNAME, PZFL.JSPZFL_OPP_OPEN_BANK OPPBANK, PZFL.JSPZFL_OPP_ACTNO OPPACTNO, TRAN.OPP_CUST_NAME, TRAN.OPP_CUST_ACC_CODE FROM JSPZK PZK, JSPZFL PZFL, TRAN_FLOW TRAN, CUST_BASE KHXX, LSKMZD KMZD WHERE PZK.JSPZK_PZNM = PZFL.JSPZFL_PZNM AND TRAN.TRAC_ID(+) = PZK.JSPZK_DJBH AND PZFL.JSPZFL_DWBH = KHXX.cust_code AND PZFL.JSPZFL_KMBH = KMZD.F_KMBH(+) and exists (select 1 from V_DIC_ACC ACC where ACC.BH = PZFL.JSPZFL_ZHBH AND ACC.BH = ‘990110100187704203‘) AND PZK.JSPZK_PZRQ >= ‘20181224‘ AND PZK.JSPZK_PZRQ <= ‘20181224‘ AND PZK.JSPZK_JGBH = ‘99‘ AND PZK.JSPZK_JZBZ IN (‘1‘, ‘2‘) ORDER BY PZK.JSPZK_PZNM, PZFL.JSPZFL_FLNM
Oracle Parallel模式
标签:let col 版本 工作 情况 rac bank sns 最大化