Re: SQL optimizations in Oracle
Date: 27 Aug 2004 03:33:18 -0700
Message-ID: <42fc55dc.0408270233.67f76124_at_posting.google.com>
I had a previous post on this thread which was mildly out of whack. What was I thinking!?
Your queries using ROWNUM will not work for your pagination purposes.
Period.
You cannot get "page 2" by saying "select ... from ... where rownum
between 101 and 200".
Cheers.
v_rishi_k_at_yahoo.com (Rishi Kumar) wrote in message news:<fd3b9393.0408262011.613cbdfe_at_posting.google.com>...
> consider the following queries that deals with report pagination
>
> a ) select MYROWS.* from
> (select * from TABLE_NAME) MY_ROWS where rownum between 1 and 100
>
> b) select * from TABLE_NAME where rownum between 1 and 100
>
> My question : Does oracle optimize the first query so that it is not
> significantly different (on execution time) when compared to the
> second query ?
>
> Thanks
>
> Rishi
Received on Fri Aug 27 2004 - 12:33:18 CEST