Temporary table record limit in Sql server

浪尽此生 提交于 2019-12-01 02:25:38

问题


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


回答1:


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




回答2:


A temporary table is a table so this would apply: Maximum Capacity Specifications for SQL Server

Rows per table

Limited by available storage




回答3:


No, there is no records limit for temporary table (the limit is the disk space). But be careful, because temporary tables are physically created in tempdb database, and this database must be placed on the disk with appropriate size.




回答4:


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




回答5:


Temporary tables are stored in the tempdb Database, and can grow as long as tempdb itself can grow (i.e. until the disk is full).




回答6:


Till your server memory (i.e., disk) supports, there is no issue how many records you are pushing into the temp table.

I think there is no limit on the number of records you push in the temporary table.



来源:https://stackoverflow.com/questions/10084857/temporary-table-record-limit-in-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!