I always tend to use procedures for the really intensive queries that need
to be run frequently, the difference isn't enormous but there is one. You
don't need to all or nothing it, I'm not a believer in that. I would suggest
try rewriting one of the more performance intensive queries as a procedure
and test to see if you get any benefit from it. Most of my apps use a
mixture of stored procedures and inline SQL.

Hope that helps.

> -----Original Message-----
> From: Matt Blatchley [mailto:[email protected]]
> Sent: 05 January 2010 14:59
> To: sql
> Subject: Should I use a Stored Procedure?
> 
> 
> I recently purchased O'Reilly's book, "MySQL Stored Procedure
> Programming" and found some interesting paragraph about half way
> through the book (yes I skipped a lot of it to get to that section).
> I'm not totally new to Stored Procedure's (certainly not an expert),
> but I rarely use them, which brings me to my question(s).
> 
> I'm in the process of launching a rather large application using CF7
> and mySQL5.  The application compiles a lot of metric data obtained
> from marketing accounts like Adwords, Bing, Yahoo as well as
> Analytical data from other software sources.
> 
> I've got pretty much everything done with workflow and I'm in the
> process of Optimizing the pages using Query Caching and Indexing of
> some of the tables.  I'm looking into the use of Stored Procedures and
> can't seem to decide.  I have specific pages that use CFChart and
> supply many calculated metrics under that chart to display marketing
> trends to deliver an overall view of monthly, yearly, and even daily
> information.  Would a Stored Procedure be better or faster in this
> case??  I've been reading that there are two schools of thought on the
> subject.  Either use SP's all the time or don't.  But that was written
> in 2006, am I missing somthing??  Any thought's, insights, or opinions
> would be greatly appreciated!
> 
> Thanks,
> 
> Matt
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~|
> Want to reach the ColdFusion community with something they want? Let
> them know on the House of Fusion mailing lists
> Archive:
> http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3255
> Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
> Unsubscribe:
> http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=8778.8006.6


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3256
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to