Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: replace or translate?
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-lReceived on Thu Feb 10 2005 - 20:06:08 CST
![]() |
![]() |