Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Strange Oracle Optimization
Because it does not have any rows. Your query probably has an order by and
that is why it ran out of temp space.(You probably don't have a temp
tablespace defined or even defined properly and your sort area size it
probably pretty small - like 64 K) Rownum is the number of the row that is
returned in the result set before sorting and thus rownum>0 means return no
rows.
Jim
"Kin Ng" <kin_ng5_at_yahoo.com> wrote in message
news:d5b3f600.0307121116.283114b1_at_posting.google.com...
> I have a complex query that takes a really long time to run and
> actually never completed because it ran out of space. But if I add
> this meaningless (oh well, may be meaningful) condition in the
> existing Where clause, the query returns data in a few seconds.
>
> and ROWNUM > 0
>
> Why adding this makes a query run so much faster?
Received on Sat Jul 12 2003 - 15:17:57 CDT