Conclusion
I hope this chapter helped you realize that there are significant differences between the different types of temporary objects supported by SQL Server. I had to dispel a few widespread myths, especially with regard to table variables. Remember that it’s typically advisable to use table variables for small tables and to compare table variables against temporary tables for the most critical queries. You realize that there’s a time and place for each type and that there’s no one type that is always preferable to the others. I gave you a summary table with the aspects and functionality of each type, which should help you make the right choices based on your needs. Also, remember to pay special focus to tempdb, which can become a bottleneck ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access