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: Query optimisation

Re: Query optimisation

From: Dave Wotton <Dave.Wotton_at_it.camcnty.no-spam.gov.uk>
Date: 1997/11/21
Message-ID: <6542dd$q8e@dns.camcnty.gov.uk>#1/1

"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

Original text of this message

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