1. business logic located in the database
2. stored procedures execute faster as an execution plan is saved
3. more secure
4. easier to manage
5. return lots of result sets with only one call to the sp
6. easier to re-use
7. i could come up with more but I hope this will convince you

Converting your existing queries to Stored Procedures isnt to difficult, but whether 
its worth it?? I reckon from now on you should use Stored Procedures, that will give 
you more benefit, unless you are also allowed to recode the SQL statements?

Taco

-----Original Message-----
From: James Cowperthwaite [mailto:[EMAIL PROTECTED]
Sent: Friday, 28 May 2004 2:09 PM
To: CFAussie Mailing List
Subject: [cfaussie] Stored Procedures - worth changing to?


Hi, the majority of our sites user a fairly standard database call (most
often to MS Sql servers) for their dynamic content (see below).

While I have never noticed any performance issues I have been told that
this would run better using stored procedures.

Can anyone outline the benefits / costs (one cost being some recoding)
of using stored procedures and if necessary how I would adapt the query?

Thanks!
James

<cfquery name="qPageBody" datasource="#REQUEST.datasource#"
username="#REQUEST.username#" password="#REQUEST.password#" >
  SELECT pageName,pageBody,pageHeader,pageJoin,relatedPages
  FROM #REQUEST.navTable#
  WHERE 1=1
  AND id=<cfqueryparam value=#defaultPage# cfsqltype="cf_sql_integer">
</cfquery>


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Register now for the 3rd National Conference on Tourism Futures, being held in 
Townsville, North Queensland 4-6 August - www.tq.com.au/tfconf

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to