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: Session optimizer goal and PLSQL

Re: Session optimizer goal and PLSQL

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 14 Jun 2001 23:13:26 +0200
Message-ID: <tiia3obbfp3971@beta-news.demon.nl>

"Andrew" <ABryndin_at_retailpro.com> wrote in message news:2bfebe60.0106141216.5eee14d0_at_posting.google.com...
> I use Oracle 8.1.7 EE for NT
> Have database instance optimizer goal=choose, for the session
> first_rows.
> Oracle documentation states:
> "The optimizer goal applies only to queries submitted directly. Use
> hints to determine the access path for any SQL statements submitted
> from within PL/SQL. The ALTER SESSION... SET OPTIMIZER_MODE statement
> does not affect SQL that is run from within PL/SQL."
>
> When I traced my session, trace file shows for all SQL issued from
> PLSQL package optimizer goal inhereted from the session i.e FIRST_ROWS
> (no direct hints on packaged SQL)
> Is it error in documentation or glitch in tkprof? How could I know the
> real execution plan for such PLSQL SQL statements?

Question: did you use explain= on the tkprof command line. If so, tkprof will calculate *new* execution plans, not necessarily those in the trace file. To see those, do not use explain=

Hth,

Sybrand Bakker, Oracle DBA Received on Thu Jun 14 2001 - 16:13:26 CDT

Original text of this message

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