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: replace or translate?

Re: replace or translate?

From: Bill Coulam <bcoulam_at_gmail.com>
Date: Thu, 10 Feb 2005 19:03:14 -0600
Message-ID: <f51d3302050210170369c27b75@mail.gmail.com>


I ran a number of tests on 125K rows with three nested REPLACE calls vs. a simple TRANSLATE. On my box, the translate is not only cleaner to code, but edged out the REPLACE by a second every time. 'Course if I were replacing some complex string, I wouldn't even know where to being if I were forced to use TRANSLATE; I'd turn to REPLACE.

On Thu, 10 Feb 2005 12:17:15 -0500, Sami Seerangan <dba.orcl_at_gmail.com> wrote:
> I meant "better" in terms of performance
>
>
> On Thu, 10 Feb 2005 11:12:18 -0600, Knight, Jon <jknight_at_concordefs.com> wrote:
> > All things being equal, I prefer the translate because it's cleaner/less
> > code. But, it really depends on how your using it and what you mean by
> > "better".
> >
> -----Original Message-----
> > From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]
> > On Behalf Of Sami Seerangan
> > Sent: Thursday, February 10, 2005 11:08 AM
> > To: Oracle Discussion List
> > Subject: replace or translate?
> >
> > Which one is better?
> > replace(replace(a.url_addr_text,';','/'),'?','/')
> > translate(a.url_addr_text,';?','//')
> >
> --
> http://www.freelists.org/webpage/oracle-l
>

-- 
bill coulam
bcoulam_at_gmail.com
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 10 2005 - 20:06:08 CST

Original text of this message

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