I do agree it depends on situation and I' be curious to see how it performed
in ASP or .NET or some other language as opposed to CF.  

-----Original Message-----
From: Justin D. Scott [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 30, 2005 6:48 PM
To: CF-Talk
Subject: RE: Philosophy Q: SP's or CFQUERY?

> You mention SP's will give greater performance.  I
> think that may be a myth these days.  Google around
> and you will find all sorts of debates on it.  I was
> shocked myself after spending a good bit of day
> taking some queries from a CF page and dumping them
> into a shiny new stored proc and things didn't
> improve and actually seemed to slow down some.

In my experience, it depends on the data you're querying against and how it
is to be used.  One example I had was a table with 1,000,000+ rows that had
to have random data pulled out of it about once every 3 to 5 seconds, and
more at peak hours.  Even with the proper indexes and the entire table in
memory, the one query being run from ColdFusion with one variable was eating
up 75% of the processor on average, and closer to 90% during peak.

Converting that one query to a SP and passing the variable to it knocked the
CPU usage on the CF server down to about 5% on average.  It really did help
a LOT.  If you're working with smaller tables that don't get a lot of
traffic, you probably won't notice much of a difference, if any.


-Justin Scott




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222682
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to