RE: Optimizer not using index on raw column

  • From: "Harvinder Singh" <Harvinder.Singh@xxxxxxxxxxxxx>
  • To: "Bobak, Mark" <Mark.Bobak@xxxxxxxxxxxxxxx>, "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 14 Feb 2007 14:57:10 -0500

Thanks a lot.

 

________________________________

From: Bobak, Mark [mailto:Mark.Bobak@xxxxxxxxxxxxxxx] 
Sent: Wednesday, February 14, 2007 2:55 PM
To: Harvinder Singh; oracle-l
Subject: RE: Optimizer not using index on raw column

 

Yes, the problem is that you're doing an implicit conversion.  If you
use HEXTORAW() it should solve the problem.

 

Try:

 

select * from tab1 wnere raw_column = hextoraw('value');

 

Hope that helps,

 

-Mark

 

--

Mark J. Bobak

Senior Oracle Architect

ProQuest Information & Learning

There is nothing so useless as doing efficiently that which shouldn't be
done at all.  -Peter F. Drucker, 1909-2005

 

 

________________________________

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Harvinder Singh
Sent: Wednesday, February 14, 2007 2:12 PM
To: oracle-l
Subject: Optimizer not using index on raw column

Hi,

 

We have an unique index on raw(16) column but whenever we issue a query
on this table optimizer is doing fullscan and not using the index but
when I force index it works fine:

Select * from tab1 where raw_column = 'value';

 

Is this expected behavior that when we refer RAW columns in query that
Optimizer not use the index?

 

Thanks

--Harvinder

 

Other related posts: