Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Hints
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 ...Received on Fri Sep 28 2001 - 03:39:33 CDT
>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
>