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

Home -> Community -> Usenet -> c.d.o.server -> Re: How "deterministic" are EXPLAIN PLAN results?

Re: How "deterministic" are EXPLAIN PLAN results?

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Thu, 10 Apr 2003 15:22:30 +0400
Message-ID: <b73k6u$462$1@babylon.agtel.net>


"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news:csZka.8$PD5.119_at_news.oracle.com...
> "Sybrand Bakker" <gooiditweg_at_nospam.demon.nl> wrote in message
> news:1jk89vo64iubghsbnb6o6aro39l8njo44i_at_4ax.com...
> > Because in PL/SQL blocks the optimizer always goes for ALL_ROWS mode,
> > and first_rows hints are ignored.
>
> Old heuristic-based "first_rows" or new cost-based "first_rows"?
>
> Even if it's true, then it's just an ugly artifact that could be submitted
> as bug. Essentially it is saying that PL/SQL client code is different from
> anything else. As if a user can't open cursor in PL/SQL block and fetch 10
> first rows only.

Actually, what Sybrand probably meant is that the OPTIMIZER_MODE setting is ignored in PL/SQL and is always assumed ALL_ROWS. But to my knowledge hints are not ignored, so if you hint your query with /*+ FIRST_ROWS */, it will be executed in this mode by both PL/SQL and SQL engines. By the way, this may not apply to 9i since PL/SQL and SQL use the same engine in 9i.

-- 
Vladimir Zakharychev (bob@dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.
Received on Thu Apr 10 2003 - 06:22:30 CDT

Original text of this message

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