Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> (Non-)Use of indexes

(Non-)Use of indexes

From: Mark <mark.harris_at_spam.begone.ukonline.co.uk>
Date: Fri, 7 Jun 2002 12:02:49 +0100
Message-ID: <3d009254$0$4732$afc38c87@news.easynet.co.uk>


Hi,

I'm attempting to tune an SQL statement, but I cannot get the optimiser to use one of the indexes upon one of the tables in the query.

The SQL looks like this:

SELECT ...
FROM table1 t1
, table2 t2
, table3 t3

WHERE t3.column = t2.column1
AND t2.column2 = t1.column

The optimiser uses indexes upon tables t3 and t2 as required. However, it doesn't use the one on t1 when linking to t2. The columns are VARCHAR(t2) and NUMBER(t1) respectively. I've tried using an explicit TO_NUMBER on the t2 column, and an INDEX hint too, but neither work in getting the optimiser to use the index.

If I remove t3 and just link t1 and t2, the index is used by the optimiser.

Any suggestions why this should be would be appreciated, as I'm baffled.

Ta

Mark Received on Fri Jun 07 2002 - 06:02:49 CDT

Original text of this message

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