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: use of LIKE '%TARGET' vs = 'TARGET'

Re: use of LIKE '%TARGET' vs = 'TARGET'

From: Kevin P. Fleming <kfleming_at_access-laserpress.com>
Date: Mon, 17 Aug 1998 21:38:41 GMT
Message-ID: <Bp1C1.415$435.1754682@news.rdc1.az.home.com>


If you're using LIKE '%TARGET', there's no way for Oracle to use any indexes. If you use 'TARGET%' or ='TARGET', the indexes come into play and make the query respond much more quickly (assuming the column is indexed).

LIKE by itself is _not_ a performance hog, rather, the design of your tables doesn't lend itself to making this particular query fast.

chrisoc_at_ans.net wrote in message <6ra10d$bs1$1_at_nnrp1.dejanews.com>...
>
>
>Even when the result set is the same, LIKE is a real performance
>hog. Does anybody know exactly what it is doing, that takes all the
>time?
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Mon Aug 17 1998 - 16:38:41 CDT

Original text of this message

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