query not using functional index

query not using functional index

 

  

Howdy:

Running Oracle 9i rel 2.

I have a table that is about 15 million records.
I have a functional index (TRIM("CONTRACT_ID_NUM"))
on the column CONTRACT_ID_NUM.

I try to join on different tables using the same
column name and after looking at the table (via
the console manager), it seems that the entire table
is being scanned row by row and the index isn't being
used.

Question: Does it matter that when I join, I match
by saying 'where TRIM(A.CONTRACT_ID_NUM)=TRIM(B.CONTRACT_ID_NUM)'
*and* have the index designed as TRIM(CONTRACT_ID_NUM)?
I can't think of a reason why TRIM would have this effect,
but I don't know for sure.

Suggestions?

Thanks!

-X
Oracle LazyDBA home page