SQL Server:表中的最大行数 [英] SQL Server: the maximum number of rows in table

查看:337
本文介绍了SQL Server:表中的最大行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发的软件将大量数据存储在其数据库表(SQL Server版本8,9或10)中。假设每天大约有10万条记录插入该表中。每年约有3600万条记录。为了担心我会失去表演,我决定每天创建一个新的表格(一个名称为当前日期的表格),以降低每张表格的记录数量。





感谢您的回答。

解决方案

很难给出一个通用的答案。这真的取决于多少因素:




  • 你的行是什么尺寸

  • 什么样的数据你存储(字符串,blob,数字)

  • 你如何处理数据(只需保存为存档,定期查询)

  • 您的表上有索引 - 有多少

  • 您的服务器规格是多少




正如这里的其他地方所述,每天100,000次,因此每张桌子都是过度的 - 我建议每月或每周甚至每季度。越多的表格就会变得越来越多的维护/查询恶梦。


I develop software that stores a lot of data in one of its database tables (SQL Server version 8, 9 or 10). Let's say, about 100,000 records are inserted into that table per day. This is about 36 million records per year. For fear that I would lose on performance, I decided to create a new table everyday (a table with current date in its name) to lower the number of records per table.

Could you please tell me, whether it was a good idea? Is there a record limit for SQL server tables? Or do you know how many records (more or less) can be stored in a table before performance is lowered significantly?

Thanks for your answers in advance.

解决方案

It's hard to give a generic answer to this. It really depends on number of factors:

  • what size your row is
  • what kind of data you store (strings, blobs, numbers)
  • what do you do with your data (just keep it as archive, query it regularly)
  • do you have indexes on your table - how many
  • what's your server specs

etc.

As answered elsewhere here, 100,000 a day and thus per table is overkill - I'd suggest monthly or weekly perhaps even quarterly. The more tables you have the bigger maintenance/query nightmare it will become.

这篇关于SQL Server:表中的最大行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆