Which of these two methods would be faster?
--------- Method 1 ---------
<cfquery>
SELECT * FROM table WHERE someID = #someVar#
</cfquery>
<cfif query.recordCount IS 1>
<cfquery>UPDATE table...</cfquery>
<cfelse>
<cfquery>INSERT INTO table...</cfquery>
</cfif>
--------- Method 2 ---------
<cfquery>
DELETE FROM table WHERE someID = #someVar#
</cfquery>
<cfquery>INSERT INTO table...</cfquery>
----------------------------
I know the difference will be small but even if it is only 10ms per
iteration that is a 5 minute difference over 30,000 records and that adds up
to a 90 minute difference over the course of a day to the process we are
running.
--
Jay
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.12.12/979 - Release Date: 29/08/2007
20:21
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287429
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4