Whether or not you need to do a full table scan accross your partitions depends on whether you are selecting results from more than one partition as well as what local and global indexes you have. Since I don't know either this is my suggestion.
Code:SELECT ccmr.card_name, ccis.cus_id, ccac.tier_status_ind, ccac.acct_status_ind, NVL( TO_CHAR( ccis.card_exp_dt, 'dd/mm/yyyy hh:mm:ss' ), 'NIL' ) AS exp_date FROM ( SELECT int_id, tier_status_ind, acct_status_ind FROM cus_account prg_cd = 'KF' AND acct_status_ind IN ( 'A', 'D', 'E' ) AND tier_status_ind IN ( 'Q', 'T', 'L' ) AND ignore_flg = 'N' AND ( card_valid_till_dt IS NULL OR card_valid_till_dt >= SYSDATE ) ) ccac, ( SELECT int_id, cus_id FROM cus_card_iss ignore_flg = 'N' AND ( card_ind != 'S' OR card_ind IS NULL ) AND ( card_valid_till_dt IS NULL OR card_valid_till_dt >= SYSDATE )) ccis, cus_pers ccmr WHERE ccac.int_id = ccmr.int_id AND ccac.int_id = ccis.int_id;




Reply With Quote