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 |
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-04-09 : 14:29:09
|
| My old code used temp table in which there are about 50 columns.create table #a(...50 columns)insert into #aselect (...50 columns) from order where ID =@idIf I re-code to use sp_executesp, is it fast? |
|
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2010-04-09 : 14:46:27
|
| Sorry, I mean sp_executesql not sp_executesp |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-04-09 : 15:13:08
|
| no. it's not going to make it any faster |
 |
|
|
dineshrajan_it
Posting Yak Master
217 Posts |
Posted - 2010-04-10 : 00:59:45
|
| sp_executesql is faster since it doesnt get recomplied based on specify various input parameters for query. And also make sure u keep the option plan for temp table for cahcingIam a slow walker but i never walk back |
 |
|
|
|
|
|