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: Hints

Re: Hints

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 28 Sep 2001 09:39:33 +0100
Message-ID: <1001668128.3428.1.nnrp-13.9e984b29@news.demon.co.uk>

There are various reasons why Oracle can appear to ignore your hint - in the specific case you have quoted it may be that the hint you have given has the incorrect syntax.

>Third run: hint /*+ Index tableA(indexname) */

Should be

    /*+ index ( tableA indexname ) */

Also, if you have given tableA an alias, then the hint should use the alias, and not the table name.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases

Screen saver or Life saver: http://www.ud.com
Use spare CPU to assist in cancer research.

sweidanz_at_yahoo.com wrote in message ...

>Folks,
>Is it possible that Oracle optimiser would ignore the hint and does
>something different?
>Here is my case:
>
>- Oracle 8.1.6/ Solaris
>- Optimiser mode is CHOOSE
>- There are statistics for the tables in the query
>
>First run: (no hints)
>- execution plan says that the optimiser used the cost_based method.
>- it did a full table scan on table A.
>
>Second run: hint /*+ RULE */
>- The execution plan used an index in table A
>
>Third run: hint /*+ Index tableA(indexname) */
>- The optimiser did a FULL table scan on tableA.
>
>Just wondering if thats possible, that the optimiser would ignore the
>hint, or i might be missing something here?
>
>thanks,
>ZS
>
Received on Fri Sep 28 2001 - 03:39:33 CDT

Original text of this message

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