Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sql Query - Help
Why not:
Select * from (
Select id, rownum rn from emp_dtl where 1 = 1 AND Group='WHO' and Cust_acct='GE' and Update_tag = 'F' and Category_code=1 order by Acct_num, seq_number ) where rn >= 50 and rn < 100;
btw., what's oracle version?
Igor Neyman, OCP DBA
ineyman_at_perceptron.com
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sanjay Mishra
Sent: Wednesday, June 01, 2005 12:30 PM
To: oracle-l_at_freelists.org
Subject: Sql Query - Help
I had query
select * from
(select inner.*, rownum rn from
(select ID from emp_dtl where 1 = 1 AND Group='WHO' and Cust_acct='GE'
and Update_tag = 'F' and Category_code=1 order by Acct_num, seq_number
)inner
where rownum < 100)
where rn >= 50
The Inner Portion run in few second , while the reamining query takes ages like 40-45minutes. Any idea as what I am missing or any optimization.
TIA Sanjay
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Wed Jun 01 2005 - 13:52:18 CDT