Oracle Insert Into select 非常慢
INSERT/*+APPEND*/INTOEF_EFEE_3_EFEL(EFLE_ID,EFLE_ESCO_ID,EFLE_EFEE_ID,EFLE_EFEL_ID)SE...
INSERT /*+ APPEND*/ INTO EF_EFEE_3_EFEL(EFLE_ID,EFLE_ESCO_ID,EFLE_EFEE_ID,EFLE_EFEL_ID)
SELECT SEQ_EF_EFEE_3_EFEL.NEXTVAL,EFEE_ESCO_ID,EFEE_ID,EFEL_ID FROM
(SELECT EFEE.EFEE_ESCO_ID,EFEE.EFEE_ID,EFEL.EFEL_ID FROM EF_EFEP_2_EFEL EFEE
LEFT JOIN EF_ESTIMATE_LARGE EFEL ON EFEL.EFEL_ESCO_ID = EFEE.EFEE_ESCO_ID
AND EFEL.EFEL_SEGMENT2 = EFEE.EFEE_DEPT_SEG_CODE
AND EFEL.EFEL_SEGMENT3 = EFEE.EFEE_EBCG_CODE
AND EFEL.EFEL_SEGMENT4 = EFEE.EFEE_EBSC_CODE
AND EFEL.EFEL_SEGMENT5 = EFEE.EFEE_EBCU_CDH_CODE
AND EFEL.EFEL_SEGMENT6 = EFEE.EFEE_EBOT_CODE
AND EFEL.EFEL_SEGMENT7 = EFEE.EFEE_EBPJ_PROJECT_CODE
AND EFEL.EFEL_ATTRIBUTE2 = EFEE.EFEE_DP_NUMBER
AND EFEL.EFEL_SUBSTR3 = EFEE.EFEE_IS_RP
AND EFEL.EFEL_REFERENCE_2 =
(case when EFEE.EFEE_IS_RP = 1 THEN EFEE.EFEE_EBCU_CDH_ACODE
when EFEE.EFEE_IS_RP = -1 THEN EFEE.EFEE_EBCU_CDH_SCODE end)
WHERE EFEE.EFEE_ESCO_ID = 5012001
AND EFEE.EFEE_EBAP_CODE = 'Aug-2013'
AND EFEE.EFEE_EFEL_ID IS NULL)
EFLE where EFLE.EFEL_ID IS NOT NULL 展开
SELECT SEQ_EF_EFEE_3_EFEL.NEXTVAL,EFEE_ESCO_ID,EFEE_ID,EFEL_ID FROM
(SELECT EFEE.EFEE_ESCO_ID,EFEE.EFEE_ID,EFEL.EFEL_ID FROM EF_EFEP_2_EFEL EFEE
LEFT JOIN EF_ESTIMATE_LARGE EFEL ON EFEL.EFEL_ESCO_ID = EFEE.EFEE_ESCO_ID
AND EFEL.EFEL_SEGMENT2 = EFEE.EFEE_DEPT_SEG_CODE
AND EFEL.EFEL_SEGMENT3 = EFEE.EFEE_EBCG_CODE
AND EFEL.EFEL_SEGMENT4 = EFEE.EFEE_EBSC_CODE
AND EFEL.EFEL_SEGMENT5 = EFEE.EFEE_EBCU_CDH_CODE
AND EFEL.EFEL_SEGMENT6 = EFEE.EFEE_EBOT_CODE
AND EFEL.EFEL_SEGMENT7 = EFEE.EFEE_EBPJ_PROJECT_CODE
AND EFEL.EFEL_ATTRIBUTE2 = EFEE.EFEE_DP_NUMBER
AND EFEL.EFEL_SUBSTR3 = EFEE.EFEE_IS_RP
AND EFEL.EFEL_REFERENCE_2 =
(case when EFEE.EFEE_IS_RP = 1 THEN EFEE.EFEE_EBCU_CDH_ACODE
when EFEE.EFEE_IS_RP = -1 THEN EFEE.EFEE_EBCU_CDH_SCODE end)
WHERE EFEE.EFEE_ESCO_ID = 5012001
AND EFEE.EFEE_EBAP_CODE = 'Aug-2013'
AND EFEE.EFEE_EFEL_ID IS NULL)
EFLE where EFLE.EFEL_ID IS NOT NULL 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询