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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Which one is faster?

Re: Which one is faster?

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Wed, 07 Jul 2004 06:38:53 +0200
Message-ID: <phvme0p53ds1h41i8efbgmlqjqj034d6pq@4ax.com>


On Wed, 7 Jul 2004 09:32:24 +0500, "Oracle Newbie" <f93c0532_at_yahoo.com> wrote:

>I have a string of thousands of characters and I want to check if it ends
>with '>>' There are 2 ways of doing it ( or more maybe)
>
>If big_str like '%>>' Then
>
>OR
>
>If substr(big_str , length(big_str) - 1 , 2 ) = '>>' Then
>
>Which one is faster? obviously the 1st one is simpler.
>
>Or is there a better way?
>
>thx
>

The second looks faster to me.
BTW: any reason you didn't try it yourself?

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue Jul 06 2004 - 23:38:53 CDT

Original text of this message

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