简体   繁体   English

SQL Server 2008 R2的最大表大小?

[英]Largest table size with SQL Server 2008 R2?

For example, a website offers the ability to create mobile surveys. 例如,网站提供创建移动调查的能力。 Each survey ID is a FK in the survey response table, which contains ALL of the survey responses. 每个调查ID都是调查响应表中的FK,其中包含所有调查答复。

What is the size limitation of this table in a SQL Server 2008 db, if the table contains, say 20 varchar(255) fields including the bigint PK & FK? 如果表包含20个varchar(255)字段(包括bigint PK和FK),那么SQL Server 2008数据库中此表的大小限制是多少?

I realize this would depend on the file size limitation as well, but I would like some more of an educated answer rather than my guess on this. 我意识到这也取决于文件大小限制,但我想要一些更有教养的答案,而不是我对此的猜测。

In terms of searchability, some fields that contain geo-related details such as the survey ID, city, state, and two commends fields would have to be searchable, and thus indexed ... index only these fields? 在可搜索性方面,一些包含地理相关细节的字段(如调查ID,城市,州和两个评价字段)必须是可搜索的,因此索引...仅索引这些字段?

Also, aged responses would expire after a given amount of time - thus deleted from the table. 此外,老化的回复将在给定的时间后到期 - 从表中删除。 Does the table, at this point being very large, need to be re-indexed/cleaned up, after the deletions (which would be an automated process)? 在删除之后(这将是一个自动过程),此时表格是否非常大,是否需要重新编入索引/清理?

Thanks. 谢谢。

Maximum Capacity Specifications for SQL Server SQL Server的最大容量规范

Bytes per row: 8,060 每行字节数:8,060
Rows per table: Limited by available storage 每桌行数:受可用存储空间限制

Note 注意

SQL Server supports row-overflow storage which enables variable length columns to be pushed off-row. SQL Server支持行溢出存储,它允许在行外推送可变长度列。 Only a 24-byte root is stored in the main record for variable length columns pushed out of row; 只有一个24字节的根存储在主记录中,用于推出行的可变长度列; because of this, the effective row limit is higher than in previous releases of SQL Server. 因此,有效行限制高于以前版本的SQL Server。 For more information, see the " Row-Overflow Data Exceeding 8 KB" topic in SQL Server Books Online 有关详细信息,请参阅SQL Server联机丛书中的“超过8 KB的行溢出数据”主题

You mention 'table size' -- does this mean number of rows? 你提到'表大小' - 这是否意味着行数?

Maximum Capacity Specifications for SQL Server SQL Server的最大容量规范

Rows per table : Limited by available storage 每桌行数:受可用存储空间限制

As per this Reference , the max size of a table is limited by the available storage . 根据此参考 ,表的最大大小受可用存储的限制

It sounds like you are going to have a high traffic and high content table. 听起来你会有一个高流量和高内容的表。 You should consider performance and storage enhancements like Table Partitioning . 您应该考虑表格分区等性能和存储增强功能。 Also, because this table will be the victim of often INSERTS/UPDATES/DELETES, carefully plan out your indexing, as indexes add overhead for DML statements on the table. 此外,因为此表将成为经常INSERTS / UPDATES / DELETES的受害者,所以请仔细规划索引,因为索引会增加表上DML语句的开销。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM