SQL Server Interview Question #261
What is tempdb and what is it used for?
SQL Server Internals & Administration Senior Advanced
Detailed Explanation
tempdb is a SQL Server system database used for temporary objects and internal workspace. It stores local and global temporary tables, table variables' underlying storage, worktables, sorts, hashes, spools, and row-versioning data used by relevant engine features.
tempdb is recreated whenever SQL Server starts, so permanent application data should never be stored there. Heavy tempdb activity can become a performance bottleneck, making file configuration, storage latency, query design, and version-store usage important operational concerns.