简体   繁体   English

性能下降时SQL Server 2005中的行数限制

[英]limit of rows in SQL Server 2005 when performance degrades

What is the limit of rows in a table for SQL Server 2005, when SQL query starts getting slower? 当SQL查询开始变慢时,SQL Server 2005表的行数限制是多少? Is there any way to find out the limit? 有什么办法找出极限?

I understand it will depend upon the data length of a row. 我知道这将取决于行的数据长度。 This will also depend on how many more data in other tables and the hardware available. 这还取决于其他表中还有多少数据以及可用的硬件。

I think you are asking the wrong question. 我认为您在问错问题。

If you have the 'right' indexes to cover your query workload, the number of rows won't make much difference until you reach 10's or 100's millions of rows. 如果您拥有“正确”的索引来满足您的查询工作量,那么行数在达到10或100百万行之前不会有太大的不同。

Make sure your server has enough RAM. 确保您的服务器有足够的RAM。

There are no limits, the only restriction is hard-drive space. 没有限制,唯一的限制是硬盘空间。

The performance is based on your machine spec and how your tables are indexed. 性能取决于您的计算机规格以及表的索引方式。

too many parameters that affect this number. 影响此数字的参数过多。 hit and try method is the only available option 尝试方法是唯一可用的选项

If your performance degrades significantly as you add rows and you have good indexing, one of the most likely culprits is a poorly written query. 如果在添加行时性能显着下降,并且索引编制良好,则最可能的罪魁祸首之一就是书写不佳的查询。 This is why we can't say for sure at what point it would happen, it depends greatly on exactly how you are querying your database and your database structure. 这就是为什么我们不能确定将在什么时候发生的原因,它在很大程度上取决于您如何查询数据库和数据库结构。

Some of the common things that can work fine in small data sets but which often work badly in larger sets: cursors correlated subqueries wildcards in the first character of a where condidtion functions non-sargeable where clauses forgetting to index the foreign key fields 一些常见的事情在较小的数据集上可以正常运行,但在较大的数据集上却常常无法正常工作:游标与子查询的通配符相关联,通配符位于where条件条件函数不可更改的第一个字符中where子句忘记索引外键字段

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

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