Using table variables (or temp tables) to speed up… or slow down

In SQL Server you can use temporary tables to store intermediate results. This is a common used technique to speed up query processing. Recently I came across a problem where the temporary tables were causing the performance degradation. I’m not going into the different temporary tables types, there are good posts on these. I’m going…

0