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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191309 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

