| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: help with index hint
You've used the table name, not the table alias in the hint.
Also, following the reply about the plan, the 'table' appears to be a view anyway - which means the index doesn't 'belong' to the 'table', which may make things difficult. Better post the definition of the view too.
NB is at least one column in the index you want to use defined as NOT NULL ?
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Practical Oracle 8i: Building Efficient Databases Publishers: Addison Wesley Longman Book bound date now 8th Dec 2000 gdas_at_my-deja.com wrote in message <8ua1q4$a93$1_at_nnrp1.deja.com>...Received on Tue Nov 07 2000 - 18:52:57 CST
>I've done this many times before, but for some reason, it just won't
>work today and I can't understand it.
>
>I'm trying to specify an index hint to use a specific index in a table,
>and oracle is simply ignoring my hint and not using the index I'm
>telling it to.
>
>My looks like this:
>
>SELECT /*+ INDEX(RUN RUN_ACCT_ID_IDX) */
>COUNT(RUN_ID),MAX(RUN_ID),AVG(RUN_ID)
>FROM
> RUN A WHERE A.ACCOUNT_ID = 723 AND A.STATUS = 'OK';
>
>When I run an explain plan on this statement, it doesn show the
>specified index in the hint being used.
>
>Did I do incorrectly specify the hint? I'm stumped.
>By the way, this is on 8.1.5.
>
>Any ideas appreciated,
>Gavin
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
>
![]() |
![]() |