And by "much faster" he means by 100 milliseconds.  Realistically, I
would not consider the appending of two rows to a query to be a time
consuming operation in CF.

I would disagree with that approach too, but only on the grounds that is
more work, more code, and more convoluted than a simple case statement
in your order by.

ORDER BY
CASE WHEN id IN (x,y) THEN 1 ELSE 0 END,
last_name

Either way, it's good to know all the cat-skinning options CF gives you.

~Brad

-------- Original Message --------
Subject: Re: Order By question
From: Michael Grant <mgr...@modus.bz>
Date: Wed, June 30, 2010 2:40 pm
To: cf-talk <cf-talk@houseoffusion.com>


I respectfully disagree with this approach. Doing it in the db will be
much
faster.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334983
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to