RE: Sql Query - Help
- From: "Igor Neyman" <ineyman@xxxxxxxxxxxxxx>
- To: <smishra_97@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 13:47:26 -0400
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@xxxxxxxxxxxxxx
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Sanjay Mishra
Sent: Wednesday, June 01, 2005 12:30 PM
To: oracle-l@xxxxxxxxxxxxx
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
---------------------------------
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news & more. Check it out!
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
- References:
- Sql Query - Help
- From: Sanjay Mishra
Other related posts:
- » Sql Query - Help
- » RE: Sql Query - Help
- Sql Query - Help
- From: Sanjay Mishra