Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: strange view performance....
"Sybrand Bakker" <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message
news:btpuc01c9vrpnodc9166clkppqeeafb72e_at_4ax.com...
--snip--
> Obviously you would need to get the explain plan for both statements.
> My guess is you are using the Cost Based Optimizer (in it's very early
> immature stages) and you are suffering from the fact PL/SQL always
> uses the CBO in all_rows fashion and never in first_rows fashion.
> Your 'solution' is just a workaround, actually it is a horribly idea
> to do anything in a procedural language what could have been done by
> SQL.
>
> To summarize: to provide any accurate help, your problem description
> must be much more detailed, one would need explain plans, columns
> indexed etc, now your post boils down to one remark 'It doesn't work'
> and crystall balls have sold out here.
>
>
>
> --
> Sybrand Bakker, Senior Oracle DBA
Sybrand,
Do you believe that 8i onwards, PL/SQL uses CBO always in an all_rows fashion? I don't think so. Based on my tests in 9i (I believe its same behavior in 8i) .. pl/sql uses the same optimizer_goal as the session itself. i.e. if the session optimizer_goal is first_rows then pl/sql will also execute queries in first_rows fashion.
Which version optimizer are you talking about in the above statement?
Anurag Received on Tue Jun 15 2004 - 17:44:21 CDT