Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Unexpected result from simple query

Re: Unexpected result from simple query

From: Can <no_at_spam.net>
Date: Sun, 14 Dec 2003 11:22:51 GMT
Message-ID: <fKXCb.59476$dt3.12955@news.chello.at>


Hi,

By the way: I actually had the solution 2 minutes after posting....but then was very curious, if someone would find it here...

The problem's an optimizer hint: The initialization parameter optimizer_mode was set to FIRST_ROWS_100 instead of ALL_ROWS....well I added the necessary hint to the query - and voilą - everything worked again.

Thanks for your replies ;o)

Kind regards,

                    Can

"Can" <no_at_spam.net> schrieb im Newsbeitrag news:K77Cb.8493$dt3.380_at_news.chello.at...
> Hi,
>
> To my astonishment, the following query doesn't limit the resultset as
> desired:
>
> SELECT columnA, columnB, RN
> FROM (
> SELECT columnA, columnB, ROWNUM RN
> FROM mytable
> )
> WHERE RN BETWEEN 4 AND 12;
>
> If I'm not completely mistaken this used to work. It should return me no
> more than 13 rows. But unfortunately I get all the rows from the table.
> Could it be that some optimizer hint is responsible for this behaviour
> (which I dont't assume)?
> Or could the analyzation of the table have turned the query disfunctional?
I
> don't have any idea as to why the query returns keeps returning all
rows...
>
> Thanks for comments...
>
> Can
>
>
Received on Sun Dec 14 2003 - 05:22:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US