General X++ Development

What is the difference between InMemory and TempDB temporary tables?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

What is the difference between InMemory and TempDB temporary tables?

SSunny Vasty75 reputation · answered Aug 13, 2026

InMemory and TempDB are both temporary, but they behave differently.

InMemory

  • Starts in application memory.
  • Can spill to disk as it grows.
  • Works well for smaller temporary datasets.

TempDB

  • Uses SQL temporary storage.
  • Supports SQL-side joins and set-based processing better.
  • Is usually the better fit for larger datasets and many SSRS/reporting scenarios.

I normally reach for TempDB when the dataset is not tiny or when I know I will be joining/querying the temp data heavily.