SQL Interview: 91 Table variables and memory
This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Administration Level: Medium
Question:
A developer in your team has observed that your database servers are very I/O bound. He thinks the I/O is simply too slow.
What he’s suggesting is that you replace all use of temporary tables with table variables. His argument is that they are memory-based instead of disk-based and that this should help to reduce the I/O load. Your applications make heavy use of temporary tables, and most have large numbers of rows.
2025-11-25

