Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: ESCAPE clause causing longer query execution time
What exactly does you like clause look like
it should be something like column_name like 'EZ\_COMPARE%' escape '\'
Also if you use a like and do not provide a wildcard then the like is
converted to an equality relation
so that column like 'MIKE' becomes column = 'MIKE' which is very different
from column like 'MIKE%'
HTH -- Mark D Powell --
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of
traci.l.rebman_at_rrd.com
Sent: Friday, February 18, 2005 2:41 PM
To: Oracle-L_at_freelists.org
Subject: ESCAPE clause causing longer query execution time
Hello,
I have a query using LIKE with the ESCAPE clause to search for an
underscore '_' as a literal value. When I run the query with the ESCAPE
clause it takes much longer then when the same query is run without the
ESCAPE clause. I thought maybe it was an index issue, but explain plans
for both queries are identical. I also tried rebuilding the indexes on
the table, but that made no improvement. Does anyone have any
suggestions...I am stumped!
Time to delete row with value "EZ_COMPARE" ==> 2 min. 54 secs. Time to delete row with value "EZCOMPARE" ==> 2 secs.
Thank you in advance,
Traci L. Rebman
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 18 2005 - 16:35:25 CST
![]() |
![]() |