Hi, Our program use to calling maybe 10+ SP to insert/update/delete data. All the call to SP seem to be slow. However, when we change all the call of SP (concatenate all the SP together)into direct calling by the program, the speed is impressive. For example, a)Overall speed is very slow Program call - SP1 (delete) call - SP2 (insert call - SP3 (update) b)Overall Speed is very fast, similar to above method If we concatenate all the 03 SP code into direct call by the program, instead of calling individual SP,the speed is impressive. Hence, is there any way to achieve the same speed using SP ? Thank you
You can have as many inserts/updates/deletes in a single procedure as you need. T-SQL is a procedural language, so you're not limited to one "query" per procedure.
A good referencehttp://www.sqlteam.com/item.asp?ItemID=2755 on the point too. Satya SKJ Microsoft SQL Server MVP Writer, Contributing Editor & Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.