iteration, how many iterations there are, and what other processes might
need to access the database while it's running.
The overall execution time will certianly be greater if the CFTRANSACTION
tags are inside the CFLOOP tags, but execution time for a single request at
the expense of other requests is very important in this situation. The DB
is a single resource that other requests may depend on being able to access
in order to do anything, so a long-running transaction could effectively
cease processing of all applications that depend on the database.
In other words, the CFOUTPUT analogy only addresses a part (and a small
part, I'd say) of the question at hand, and consequently isn't very
relevant, IMHO. Far too easy to draw the wrong conclusion (outside is
better), because the entire puzzle isn't considered.
Cheers,
barneyb
> -----Original Message-----
> From: Matt Robertson [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 10:37 AM
> To: CF-Talk
> Subject: Re: cftransaction inside or outside cfloops?
>
> Wouldn't the answer to this be akin to the standard advice of putting
> cfoutputs *outside* of a cfloop? In the given example, there is
> nothing meaningful going on in the loop other than stuff that needs a
> cftransaction applied to it. Wouldn't applying and reapplying such a
> block repeatedly be unnecessary overhead when you could forego this
> and apply/and disengage it only once? Is the benefit to minimizing
> the ... well, the 'span' of the application of the cftransaction -- in
> a situation where very little else is going on -- *that* significant?
>
> --
> --Matt Robertson--
> MSB Designs, Inc.
> mysecretbase.com
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

