Re: Wrapping Query in "select *" changes execution path

From: Ray Feighery <rjfeighery_at_gmail.com>
Date: Fri, 4 Jun 2010 11:32:50 +1000
Message-ID: <AANLkTikV7-VUJps5dE8iDDDiuAx-SPTqn85kThqrmO98_at_mail.gmail.com>



Also:
optimizer_mode                       string      ALL_ROWS

If I hint the query to be
select /*+ all_rows */ * from ( ... subuery....) it reverts to the initial explain plan.

On 4 June 2010 10:24, Ray Feighery <rjfeighery_at_gmail.com> wrote:
> All
>
> Oracle 10.2.0.4
> Red Hat 4 x86_64
>
> We have an application that runs standard SQL as a reporting tool. The
> amount of rows that can be returned is limited by a variable. The
> application manages this by changing the straight SQL
> from this:
>
> select *
> from users;
>
> into this:
>
> select * from (
> select * from users)
> where rownum < 25000
>
> This is causing a change in some execution paths.
>
> Is there any (simple) way I can stop or influence this behaviour?
>
> Thanks
>
> Ray
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 03 2010 - 20:32:50 CDT

Original text of this message