Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query optimisation
"Geoff Dewhurst" <Geoff_at_Bass-Soft.com.au> wrote:
>Hi,
>
>Even when I use a hint, it still does not want to use that index! I thought
>that a hint would force it to use the index, but that does not seem to be
>the case. Any thoughts?
> SELECT /*+ INDEX( CLR CLRIDX ) */ CODE FROM CLR WHERE CLRIDX = 1;
When specifying the index-name in the hint, it is the name of the
index which is specified, not the name of the indexed column.
You seem to have specified the name of the column. ( but you might have
given your index the same name as your column ). Oracle silently ignores
any incorrectly specified hints, so this might be your problem. Also,
some older Oracle tools and 3rd party products strip comments ( and hence
hints ) out of SQL before submitting it to the RDBMS. Check from your
tkprof output that the hint is getting to the database.
HTH, Dave.
-- To reply by email, remove the "no-spam" bit from my email address.Received on Fri Nov 21 1997 - 00:00:00 CST