Re: Speed difference

From: Richard Kuhler <noone_at_nowhere.com>
Date: Tue, 28 May 2002 23:47:24 GMT
Message-ID: <gGUI8.18751$R53.8606224_at_twister.socal.rr.com>


[Quoted] Doing a few simple tests, the difference is surprisingly large. Although, if there's any SQL around, it's almost certainly relatively insignificant. Even over 100 million iterations you'd probably one shave 1 minute off the runtime...

10 million iterations:

recstat IN OR
--------- ------- -------

null      23.32   17.82
NEW       25.89   19.03
INSERT    33.84   26.04
UPDATE    34.02   26.26

Note: these times varried +/- 1 second across tests but OR was always faster.

Richard

Daniel Morgan wrote:
>
> Stjepan Brbot wrote:
>
> > What is better?
> >
> > IF recstat IN ('NEW','INSERT') THEN
> >
> > or
> >
> > IF recstat='NEW' OR recstat='INSERT' THEN
> >
> > --
> >
> > Stjepan Brbot
>
> I suspect the later. Though the difference is, likely, immeasurably
> small.
>
> Daniel Morgan
Received on Wed May 29 2002 - 01:47:24 CEST

Original text of this message