Temporary table record limit in Sql server

user824910 picture user824910 · Apr 10, 2012 · Viewed 30.6k times · Source

Is there any limits for the record in the temporary table.. I have tried with 1.3 million records.. may be i have to deal with billions in the future as the application demands.. Is it possible? If i could know the limit of records.. i could try to split the records from source db and manage within the limit. Thanks in advance

Answer

Lâm Tran Duy picture Lâm Tran Duy · Apr 10, 2012

The differences between tempdb and any other database are minimal, especially when it comes to limits.

If you can store it in a user table, you can store it in a temporary table as well. It does not have to fit into RAM as the tempdb is stored on disk just like any other database (only with more aggressive caching and less logging).

Source: http://msdn.microsoft.com/en-us/library/ms190768.aspx