Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2011-04-19 : 07:52:50
|
Hi All,I am running same report from Embedded TSQL and Stored procedure as well. But Embedded TSQL is taking 5 to 6 sec while SP report is taking 35 to 40 sec. TSQL or SP is taking two parameter as start date and end date only. And TSQL or SP code is like creating temp table for sorting records by passing input parameters and then join with 4 tables with this temp table to filter out some records by passing input parameters and then drop temp table. Why Report calling SP is taking that much time?T.I.A |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-04-19 : 07:55:15
|
So is there a question?You have two different queries. You can probably optimise the SP if you wish.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
|
|
|