Hi,
I have table of 8M records. The below query takes 2 min for 2 M record output . What should I look in below query to tune.
Thank YouCode:SELECT DISTINCT UPPER(POL_PFX) POL_PFX, DECODE(SUBSTR(pol_num, 1, 3), '00X', SUBSTR(pol_num, 3, 7), '00T', SUBSTR(pol_num, 3, 7), SUBSTR(pol_num, 5)) POL_NUM, UPPER(REINS_CODE) REINS_CODE, MP_INCEPT_DT, MP_EXPIRE_DT, MP_INS_NAME FROM MF_MIS_A