MS-SQL Stored procedures are stored with their 'compiled' execution plan. If you issue a query from an application, SQL Server has to determine the execution plan before running ... determine which indices there are and which one(s) would be the best to use. So if you use SPs you could gain performance.
However, you might not be able to take advantage of compiled execution plans if you are passing in embedded parameters. In this case you should take a look at sp_executesql. Also, if you use SPs ... you can change your underlying SQL without modifying your code. Especially nice if you use the same query in multiple CF templates. You might want to take a look at CFs query caching capability. Cheers, Bill In a message dated 12/22/01 8:32:13 PM Eastern Standard Time, [EMAIL PROTECTED] writes: > I've been wondering about using stored > procedures in templates instead of > embedding queries. Is there a good reason > for this if the queries are only select > statements? > ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists