Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: ESCAPE clause causing longer query execution time

RE: ESCAPE clause causing longer query execution time

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Fri, 18 Feb 2005 16:25:08 -0500
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF410511E7A6@usahm236.amer.corp.eds.com>


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

Original text of this message

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