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: Optimizer hints in PL/SQL's embedded SQL

Re: Optimizer hints in PL/SQL's embedded SQL

From: Sergey Balter <balter_at_kompas.donetsk.ua>
Date: Fri, 1 Nov 2002 10:23:40 +0200
Message-ID: <aptdqs$n3q$2@dipt.donbass.net>


Thanks, Volodya.
You absolutely right.

I mixed a space between a comment and '+' (it must NOT use here) with a space between '+' and a hint itself. :-(((

Regards,
Sergey Balter

"Vladimir M. Zakharychev" <bob_at_dpsp-yes.com> сообщил/сообщила в новостях следующее: news:aplm7b$fj5$1_at_babylon.agtel.net...
> The way you use hints in PL/SQL is the same as in plain SQL, you just
> have to make sure you have *at least one space* between plus sign
> and the hint itself. So if you write your hint like this:
>
> SELECT /*+ INDEX(E) */ ....
>
> then it should work in both SQL and PL/SQL (provided the hint itself is
> valid.)
>
> hth.
>
> --
> Vladimir Zakharychev (bob_at_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.
>
>
> "Sergey Balter" <balter_at_kompas.donetsk.ua> wrote in message
news:aplh8f$16nl$1_at_dipt.donbass.net...
> > Hi, All,
> >
> > When I write something like
> >
> > procedure test is
> > AId Integer;
> > begin
> > SELECT /*+INDEX(E) */
> > E.Id INTO AId
> > FROM DocSpec E, .....
> > .........
> > end;
> >
> > SQL Engine absolutely ignores hint /*+INDEX(E)*/
> > Maybe PL/SQL quesses it's comments :-(((
> >
> > I am forced to bypass the problem using EXECUTE IMMEDIATE
> >
> > Is it the unique way? Does anybody know about specifying optimizer
> > hint in in PL/SQL's embedded SQL?
> >
> > Regards,
> > Sergey Balter
> >
> >
> >
Received on Fri Nov 01 2002 - 02:23:40 CST

Original text of this message

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