----- Original Message -----
From: "Deanna L. Schneider" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 7:52 AM
Subject: Re: Stored Procedures - Am I going insane?


> Paul said:
> sp_executesql will gain you something in terms of optimization, etc.
but
> this isn't the kind of thing that ought to be in an sp (unless you're
doing
> this for security or management reasons)
>
> Why not? I've been taught by our database folks that the more stuff we
can
> move into the database, the better - that cf is best used for
> outputting/formatting but that the processor-intensive stuff (loops,
etc)
> should be moved to the db when possible. What's the rational for saying
that
> you shouldn't?
>
> -d

You want to be careful here.  While I agree that moving complex processes
out of CF and into the database world is beneficial, its really more
important HOW you do it, than WHETHER you do it.  By that I mean, SQL is
a relational language.  Simply taking a giant loop out of CF and putting
it into SQL using cursors to achieve your looping, is not necessarily
going to gain you much, as SQL was not designed for looping (inherently)
like a Cold Fusion type language is.

The best results that I have achieved in this area Deanna, have come when
working directly with a relational database developer in order to take a
cold fusion loop out of the CF world, and develop a non-looping,
relational solution, written entirely in SQL.

CF is then used, as you mentioned, as an outputting/formatting vehicle.
While it is not always practical to attempt this type of a solution to
every problem, the increased performance we've seen generally makes it a
worth while endeavor.

Hope that helps.

Brian


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to