Quantcast
Viewing all articles
Browse latest Browse all 3587

Table variables performance

Comparing table variable performance to #temp table performance.

 

With 100,000 rows in both tables,

     select sum(numberfield) from #t           takes 20ms

     select sum(numberfield) from @t         takes 118ms

 

I've compared this with different number of rows and it seems table variables are around 5 - 7 times slower

than #temp tables.

 

Is there any configuration change that can be done to improve their performance or is this what you'd expect ?


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>