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: wildcard search and full tablescans

Re: wildcard search and full tablescans

From: sybrandb <sybrandb_at_gmail.com>
Date: 7 Dec 2006 04:03:46 -0800
Message-ID: <1165493026.506092.251750@16g2000cwy.googlegroups.com>

On Dec 7, 12:55 pm, wagen..._at_yahoo.com wrote:
> Oracle10g 10.2.0.1
>
> select * from <table_name> where <column_name> like '%abc%';
>
> does not use the index and does a full tablescan (guess this is the
> expected behaviour as per explain plan).
>
> Any suggestions as to how to use the index (index hint didn't help), IF
> possible or other alternatives.
>
> thanks

Index skip scan might work, but I doubt whether it will work when both the leading and the trailing part of a column are unknown. Actually Oracle Context/InterMedia, with the CONTAINS operator was invented for queries like this. I have never used it, so I can't help you further, but the very goal of CONTAINS is to address queries like this one.

Hth,

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Thu Dec 07 2006 - 06:03:46 CST

Original text of this message

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