Sebastian

Although it is a bit of a chore I'd use stored procedures all of the time if
you can.  The reason for this is as follows:

When you use CFQUERY CF passes the SQL through to SQL Server which then
parses the SQL before executing it.  If you use CFSTOREDPROC CF calls SQL
which SQL SERVER "knows about".  i.e. it has already been parsed and it has
an execution plan for it.  This is why you will see the improved performace
than Ben talks about in his book.  There are also many other advantages (in
my view) in that getting SQL Server to handle the SQL makes it much more
flexible than building the SQL statement in CF.  A classic example is if you
want to build a large dynamic SQL statement it is much easier to do it in an
SP by building up a string and then executing it than in CF (at least I
reckon it is).

------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
------------------------------------------------------------------


-----Original Message-----
From: sebastian palmigiani [mailto:[EMAIL PROTECTED]]
Sent: 11 September 2000 17:25
To: [EMAIL PROTECTED]
Subject: Stored Procedures



I'm getting my feet wet with SQL Server 7.0 and I have a question about
stored procedures.

Should all queries be turned into stored procedures or just those that
involve multiple selects, updates, and deletes? Are there any guidelines to
follow on this?

Forta in his book says that to expect about a 10% improvement in performance
by using stored procedures.

Sebastian

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to