> <cfif(serializeJSON(qry1) eq serializeJSON(qry2))>
> to compare 2 queries
>
> or
>
> sticking the queries into an array and then
> <cfif #qryArray1.equals(qryArray2)# IS "YES">

As several people have described here, you can test this (serially)
yourself very easily.

But on another note, I really hate these "which is faster" questions,
because (a) the differences are usually trivial, (b) the way most
people measure these things is misleading, and (c) there often is no
actual right answer.

First: assuming that you have a finite amount of time - I think that's
a safe assumption - you would be far better served optimizing your SQL
and your asynchronous processing. I've been working with CF for many
years, and I've looked at a lot of applications, and it's very rare
that I find one that has really been fully optimized in those two
respects. Those are going to get you a lot more bang for your buck, so
to speak.

Second: measuring something serially doesn't mean that those
measurements will also apply to parallel operations. In other words,
what runs faster with one user doesn't necessarily run faster with ten
users. You really need to test things concurrently to get a useful
measure, and running concurrent tests is time-consuming and expensive,
so you really only want to do it when there's a useful payoff.

Third: let's say you test this today, in parallel, and find out that
one is faster than the other on your version of CF. Will that hold for
other versions? I can't count the number of times that I've found
legacy code that worked well in one version of CF, but no longer works
well in another version.

In summary, I recommend you just choose the simplest approach - in
this case, the first one - because it will be easy to understand and
will work adequately well.

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

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

Reply via email to