오라클 사용중인데요! 쿼리가 많이 느린데.....방안이 있을까요.. 실행계획 SELECT B.* FROM ( SELECT CEIL(ROWNUM / nvl(NULL, 9999999)) CURRENT_PAGE, COUNT(*) OVER() AS TOTAL_COUNT, A.* FROM ( SELECT A.COMP_CD, A.ORD_DT, A.DELI_REQ_DT, A.DELI_REQ_DT AS CHECK_DT, A.DELI_TP, A.ORD_NO, A.ORD_TP, A.SAP_DOC_NO, FX_CODE_NM('COMM', 'SD0010', A.ORD_TP) AS ORD_TP_NM, FX_CODE_NM('DEPT', A.COMP_CD, A.DEPT_CD) AS DEPT_NM, FX_CODE_NM('USER', A.COMP_CD, A.SALES_ID) AS SALES_NM, A.CUST_CD, FX_CODE_NM('CUST', A.COMP_CD, A.CUST_CD) AS CUST_NM, FX_CODE_NM('COMM', 'SD0080', A.LOGISTIC_CD) AS LOGISTIC_NM, FX_CODE_NM('COMM', 'SD0020', A.DELI_TP) DELI_TP_NM, CASE WHEN A.URGENT_YN = 'Y' THEN '긴급' ELSE '일반' END URGENT_YN, CASE WHEN A.ALLOW_YN = 'Y' THEN '승인' ELSE '미승인' END ALLOW_YN, FX_CODE_NM('COMM', 'BC0710', A.EDI_TP) AS EDI_NM, FX_CODE_NM('COMM', 'BC0040', A.TAX_TP) AS TAX_NM, FX_CODE_NM('COMM', 'SD0050', A.TRANS_TP) AS TRANS_NM, A.STATUS, FX_CODE_NM('COMM', 'SD0040', A.STATUS) AS STATUS_NM, A.ADDR1 AS ADDR, A.REF_ORD_NO, A.EDI_MESG_NO, A.SLIP_DT, TO_CHAR(A.SUPPLY_AMT, '999,999,999') AS SUPPLY_AMT, TO_CHAR(A.TOT_AMT, '999,999,999') AS TOT_AMT, A.PROD_DT, A.OUT_DT, A.OUT_NO, A.TRANS_TP, SUM(B.CFM_QTY) AS CFM_QTY, SUM(B.ORD_QTY) AS ORD_QTY, SUM((SELECT SUM(CFM_QTY)FROM SD_ORDER_DET WHERE COMP_CD = A.COMP_CD AND ORD_NO = A.ORD_NO)) OVER() AS TOTAL_CFM_QTY, SUM((SELECT SUM(ORD_QTY) FROM SD_ORDER_DET WHERE COMP_CD = A.COMP_CD AND ORD_NO = A.ORD_NO)) OVER() AS TOTAL_ORD_QTY FROM ORDER_MST A JOIN ORDER_DET B ON A.COMP_CD = B.COMP_CD AND A.ORD_NO = B.ORD_NO WHERE 1 = 1 AND A.COMP_CD = '2200' AND A.DELI_REQ_DT BETWEEN REPLACE('20240212', '-', '') AND REPLACE('20240315', '-', '') GROUP BY A.COMP_CD, A.ORD_DT, A.DELI_REQ_DT, A.DELI_TP, A.ORD_NO, A.ORD_TP, A.SAP_DOC_NO, A.DEPT_CD, A.SALES_ID, A.CUST_CD, A.LOGISTIC_CD, A.DELI_TP, A.URGENT_YN, A.ALLOW_YN, A.EDI_TP, A.STATUS, A.TAX_TP, A.ADDR1, A.REF_ORD_NO, A.EDI_MESG_NO, A.SLIP_DT, A.SUPPLY_AMT, A.TOT_AMT, A.PROD_DT, A.OUT_DT, A.OUT_NO, A.TRANS_TP ) A ) B WHERE CURRENT_PAGE = nvl(NULL, 1)