How to improve the performance of SQL
This article is about how to improve the performance of SQL. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1 the initial sql implementation is as follows
SQL > SELECT 2 NVL (T.RELA_OFFER_SPEC_ID SUBOS.SUB_OFFER_SPEC_ID) "offerSpecId" 3 FROM OFFER_SPEC_RELA T 4 LEFT JOIN OFFER_SPEC_GRP_RELA SUBOS 5 ON T.RELA_GRP_ID = SUBOS.OFFER_SPEC_GRP_ID 6 AND subos.start_dt = SYSDATE 8 WHERE T.RELA_TYPE_CD = 29 AND t.start_dt = SYSDATE 11 AND (T.OFFER_SPEC_ID = 109910000618 12 OR EXISTS 13 (SELECT A.OFFER_SPEC) _ GRP_ID 14 FROM OFFER_SPEC_GRP_RELA A 15 WHERE A.SUB_OFFER_SPEC_ID = 109910000618 16 AND T.OFFER_SPEC_GRP_ID = A.OFFER_SPEC_GRP_ID 17) 18 AND rownum