Path: news.easynews.com!core-easynews!newsfeed3.easynews.com!easynews.com!easynews!newsfeed.news2me.com!newsfeed.icl.net!proxad.net!fr.ip.ndsoftware.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: "Chris \( Val \)" <chrisval@bigpond.com.au>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Which one is faster?
Date: Wed, 7 Jul 2004 22:07:07 +1000
Lines: 52
Message-ID: <2l27beF7neelU1@uni-berlin.de>
References: <2l1clgF76p3oU1@uni-berlin.de> <phvme0p53ds1h41i8efbgmlqjqj034d6pq@4ax.com> <2l1dfuF7cgu4U1@uni-berlin.de> <c0e3f26e.0407070330.592c8012@posting.google.com>
X-Trace: news.uni-berlin.de dVvMOJUm5u5lCTSzj41GoQDVk4hDE6BgPQgvBUSocUnBiIgpOs
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2096
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2096
Xref: core-easynews comp.databases.oracle.misc:111538
X-Received-Date: Wed, 07 Jul 2004 05:06:21 MST (news.easynews.com)


"Tony" <andrewst@onetel.net.uk> wrote in message 
news:c0e3f26e.0407070330.592c8012@posting.google.com...
| "Oracle Newbie" <f93c0532@yahoo.com> wrote in message 
news:<2l1dfuF7cgu4U1@uni-berlin.de>...
| > "Sybrand Bakker" <sybrandb@hccnet.nl> wrote in message
| > news:phvme0p53ds1h41i8efbgmlqjqj034d6pq@4ax.com...
| > > On Wed, 7 Jul 2004 09:32:24 +0500, "Oracle Newbie"
| > > <f93c0532@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)

[snip]

| > How can I test for speed? I'm using Toad 7.6
|
| Actually, the LIKE version is faster (on 8.1.7.3.0 anyway).  To get
| accurate timings, use SQL_TRACE and TKPROF and look at the CPU
| timings.  But in this case the difference is so dramatic you can see
| it using SET TIMING ON in SQL Plus (presumably Toad has a similar
| function?):
|
| SQL> -- Large table I happen to have to hand:
| SQL> select count(*) from sdd_elements;
|
|  COUNT(*)
| ----------
|   1703608
|
| SQL> set timing on
| SQL> -- Using LIKE:
| SQL> select count(*)
|  2  from sdd_elements
|  3  where el_name like '%NS';
|
|  COUNT(*)
| ----------
|      8031
|
| real: 5562
| SQL> -- Again
| SQL> /

[snip]

Are bind variables of any help for this kind of situation ?

Cheers.
Chris Val


