In some cases yes but in reality if you are using query caching with cfquery it can be just as fast. For simple selects you will see negligible difference in as far as the parsing is concerned but there is a hell of a lot of other things to consider with using an SP over CFQUERY which will be faster such as use of memory etc. It is not all about how fast you get results back.
-----Original Message----- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: 21 January 2005 00:13 To: CF-Talk Subject: RE: Stored Proc Question I thought that even with simple queries that Stored Procs where much faster? I tried this on a couple of other SELECTS and got noticable improvement. By the way, I always use CFQUERRPARAM. Andy -----Original Message----- From: Jochem van Dieten Andy Ousterhout wrote: > Here is the proc that I am using. You suggest either 2 separate queries or > 2 procs? > WHERE ((@InvoiceNumber IS NOT NULL) AND (tabInvoices.InvoiceNumber > [EMAIL PROTECTED])) > OR ((@PeachtreeKEY IS NOT NULL) AND (@PeachtreeInvoice IS NOT NULL) > AND (tabInvoices.PeachtreeInvoiceNumber= @PeachtreeInvoice) > AND (tabCustomers.Peachtree_FK= @PeachtreeKey)) Use 2 separate queries (in 1 or 2 procedures). Why are you using a stored procedure? This appears to be a simple SELECT that would be equally good with cfqueryparam. If there are no urgent pattern / encapsulation reasons I would probably just use 2 queries in the CF code. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware: a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191323 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54