Hi All,
Please help me out in solving this problem. I have this query which is taking very long to execute. i need to tune it. this query access 3 tables . Iam sending its execution plan in subsequent mail as i cannot mail it in a single mail? the follwoing is the query...
Select distinct a.emp_no, e.f_name, e.m_name, e.l_name
from salary_tran_detail a, emp_mast e
where a.comp_cd = '01'
and a.comp_cd = e.comp_cd
and a.fin_year = '2003040120040331'
and a.LOCN_CD IN ('0001')
and e.term_flag = 'N'
and e.confirm_flag = 'Y'
and a.emp_no = e.emp_no
and to_char(e.retiring_dt,'YYYYMM') >= '200403'
and a.salary_dt = ( select max(salary_dt)
from salary_tran_detail b
Where b.comp_cd = a.comp_cd
and b.emp_no = a.emp_No
and b.fin_year = a.fin_year
and b.emp_category_cd in ( SELECT EMP_CATEGORY_CD
From BON_ELIGIBILITY_MAST
WHERE COMP_CD = '01'
AND FIN_YEAR = '2003040120040331'))
Oracle LazyDBA home page