Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Is there a more efficient way to write
Wed, Sep 24 2008 10:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Is there a more efficient way to write the following

IF(C._URLList IS NULL AND C._Website IS NULL THEN 0 ELSE C._ID) AS _URLsExist,

I don't think either IFNULL or COALESCE will work but I may be wrong

Roy Lambert

Wed, Sep 24 2008 11:03 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Is there a more efficient way to write the following >>

Why ?  Is it slow ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Sep 24 2008 11:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

><< Is there a more efficient way to write the following >>
>
>Why ? Is it slow ?

I have no idea if its slow or not, I haven't timed it, but I like my code to be as efficient as I can make it eg after another discussion I've gone through and changed code like

IF(x is null then y else x)

to

COALESCE(x,y)

I haven't noticed any massive speed up but as I say I prefer to write efficient code.

Roy Lambert
Wed, Sep 24 2008 2:36 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I have no idea if its slow or not, I haven't timed it, but I like my code
to be as efficient as I can make it eg after another discussion I've gone
through and changed code like >>

You won't find any difference between using IF() and nested IFNULL() calls.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image