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 -> Re: How to search on a column without using LIKE?

Re: How to search on a column without using LIKE?

From: Erich Hurst <erich.hurst_at_compaq.com>
Date: 1997/09/29
Message-ID: <01bccce5$4db7cec0$62d612ac@erichhurst2.im.hou.compaq.com>#1/1

OraSaurus <granaman_at_phonet.com> wrote in article <342b2b6a.0_at_iorich.phonet.com>...
> In article <3429282f.2199682_at_news.erols.com>, drippel_at_perspect.com wrote:
> >How about using the instr function
> >
> >where instr( org_name, 'stans' ) > 0
> >and instr( org_name, 'widgets' ) > 0
> >etc.
>
> The use of a function, like instr(), disallows the use of an index on
> org_name - resulting in a table scan.
>

Yes, but so does using '%' at the start of your pattern, like '%WIDGETS%'. 'STAN%' will use the index, but '%WIDGETS%' will not. So instr() is no better or worse a solution than LIKE. Received on Mon Sep 29 1997 - 00:00:00 CDT

Original text of this message

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