Hi,

Following query is taking longer time. is there any way i can improve the 
performance. prabably last line of condition is taking much time.

i appreciate your help.

thanks
ramesh

        SELECT  fd.fom_nme_x,
                        fd.fom_i,
                        rcf.emp_i,
                        rcf.fom_i,
                        rf.*,
            af.fom_cmpltn_i,
            act_prcs.get_appvl_stat(af.act_i), 
            act_prcs.get_appvl_date(af.act_i) ,
            act_prcs.get_act_stat(af.act_i),
                        af.act_i,
                        
LOWER(REPLACE(LOWER(ei.email_x),'@ubspw.com','@ubs.com')) as email_x, 
                        ei.emp_last_nme_x,                                      
                
                        ei.emp_1st_nme_x                                        
            
          FROM  form_recipient_cmpltn_fact rcf,
                        form_resp_fact rf,
                        form_dimn fd,
            act_fact af,
                        empl_info_dimn ei
         WHERE  rcf.fom_i in (10201,10538,10539,10532) 
           AND  rcf.cmpltn_i = rf.cmpltn_i
           AND  rcf.fom_i = fd.fom_i
           AND  rcf.emp_i = ei.emp_i                                            
                
           AND  ei.emp_stat_c = 'ACTIVE'
       AND  rcf.cmpltn_i = af.fom_cmpltn_i (+)
       AND  rcf.emp_i = af.emp_i (+)
       AND rf.qsn_desc_x = 'Is this activity charitable,civic,religious or 
fraternal and recognized as tax-exempt?'
           AND rf.chce_desc_x = 'No'
          AND  act_prcs.get_act_stat(af.act_i) = 'Active'
           AND act_prcs.get_appvl_stat(af.act_i)='Approved'
          AND trunc(act_prcs.get_appvl_date(af.act_i)) = trunc(sysdate) - 1



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3352
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm

Reply via email to