Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HowTo: Release a Table variable
Message
From
10/01/2010 04:25:54
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00976391
Message ID:
01443006
Views:
28
>>I'm not able to found a command for release a Declared Table variable.
>>
>>I cannot think that a way does not exist.
>>If I write a sp very complex one,
>>where i declare 300 table variables !!!
>>
>>Thanks
>>Fabio
>
>This is an old thread, but I just came across it and I would recommend to use temp tables for such scenario (so you can drop them). Table variables can not use parallelism, so using temp tables can yield better performance.
>
>See this very interesting article http://sqlblog.com/blogs/peter_larsson/archive/2009/10/15/performance-consideration-when-using-a-table-variable.aspx by Peter Larsson.

Performance is not the first rule on programming.
The first is: minimize design errors, programming errors and bugs

I use @table variables rarely.

But it can to be usefull to implement a good programming model.
If you call a black box sp out of your control and you wish a local stack table,
a @table variable it is the only choice.

For the MSSQL's parallelism, to be honest until now I have seen more problems than benefits
Previous
Reply
Map
View

Click here to load this message in the networking platform