SELECT/*+parallel(T 16) parallel(B 16) parallel(D 16)*/
T.POLICY_NO,
T.DEPARTMENT_CODE,
T.PLAN_CODE,
FROM EPCIS_AUTO_POLICY_BASE_INFO T ,
EPCIS_AUTO_POLICY_VEHICLE_INFO B,
EPCIS_AUTO_A_PRE_MID_RESULT D
WHERE T.POLICY_NO = B.POLICY_NO
AND T.APPLY_POLICY_NO = D.APPLY_POLICY_NO(+)
AND T.LAST_BEGIN_DATE >=
ADD_MONTHS(TRUNC(TO_DATE(‘20151101‘, ‘YYYYMMDD‘), ‘YYYY‘), 9)
AND T.LAST_BEGIN_DATE <
LEAST(TO_DATE(‘20151201‘, ‘YYYYMMDD‘),
ADD_MONTHS(TRUNC(TO_DATE(‘20151101‘, ‘YYYYMMDD‘), ‘YYYY‘), 12))
AND T.UNDERWRITE_TIME < TO_DATE(‘20151201‘, ‘YYYYMMDD‘)
--强制走索引
seg是表的别名
/*+INDEX(SEG IDX_T_RES_ALLOSEG_ALLOID)*/
时间: 2024-10-26 11:55:15