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 ...

Get Inside Microsoft® SQL Server™ 2005 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.