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
Type II Storage Area structure is used for temp tables. The maximum size of the DBI file is 1 TB. Assuming 32 records per block and 25% of the blocks are index blocks: 0.75 * (32 * 1073741824) = 0.75 * (2 ^ 5 * 2 ^ 30) = 0.75 * (2 ^ 35) = 25,769,803,776 records.
Temporary tables can have a Time Travel retention period of 1 day; however, a temporary table is purged once the session (in which the table was created) ends so the actual retention period is for 24 hours or the remainder of the session, whichever is shorter.
SQL Server provides two types of temporary tables according to their scope: Local Temporary Table. Global Temporary Table.
Use these guidelines for record definition names: The name length can be up to 15 characters, with the exception of the Temporary Table type, which has a maximum length of 13 characters. The name must begin with a letter and can contain underscores to make it more readable.
Any table will run into the hard limit of 1000 maximum rows that can be inserted with a single T-SQL INSERT statement that uses a table value constructor.
The number of row value expressions in the INSERT statement exceeds
the maximum allowed number of 1000 row values.
https://dba.stackexchange.com/questions/82921/the-number-of-row-value-expressions-in-the-insert-statement-exceeds-the-maximum
A temporary table is a table so this would apply: Maximum Capacity Specifications for SQL Server
Rows per table
Limited by available storage
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With