SQL Interview: 69 When tempdb gets used

SQL Interview: 69 When tempdb gets used

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:

You are monitoring a SQL Server and you notice that tempdb is being heavily accessed. You know that your applications make very little use of temporary tables.

Can you give examples of other things that might be using tempdb.

Answer:

The tempdb database is used for many things apart from temporary tables.

These include:

  • Row versioning for snapshot isolation
  • Some sort and join operations
  • Any query that involves work tables
  • The inserted and deleted virtual tables in triggers

2025-08-08