本文介绍了估计数据库大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道您在开发新应用程序时会如何估计数据库大小.

I was wondering what you do when developing a new application in terms of estimating database size.

例如我正计划建立一个网站,并且很难估计数据库的增长规模.我不希望您告诉我数据库的大小,但是我想知道是否有一般性的估算原则.

E.g. I am planning to launch a website, and I am having a hard time estimating what size I could expect my database to grow. I don't expect you to tell me what size my database will be, but I'd like to know if there are general principles in estimating this.

例如Jeff开发StackOverflow时,(大概)推测了他的数据库大小和增长.

E.g. When Jeff developed StackOverflow, he (presumably) guesstimated his database size and growth.

我的困境是我要为我的Web应用程序寻求托管解决方案(在当前阶段,它的成本大约是),并且最好不要通过不购买足够的SQL Server空间来shoot脚自己(他们向A收取费用)溢价).

My dilemma is that I am going for a hosted solution for my web application (its about cost at this stage), and preferably don't want to shoot myself in the foot by not purchasing enough SQL Server space (they charge a premium for this).

推荐答案

如果您有数据库模式,则调整大小非常简单...只是估计的行*每个表的平均行大小*索引的某些因素*其他开销因素.鉴于如今的存储价格低得可笑,除非您打算拥有一个流量很高的站点(或正在为大型企业构建应用程序),否则调整大小通常不是问题.

If you have a database schema, sizing is pretty straightforward ... it's just estimated rows * avg row size for each table * some factor for indexes * some other factor for overhead. Given the ridiculously low price of storage nowadays, sizing often isn't a problem unless you intend to have a very high traffic site (or are building an app for a large enterprise).

对于我自己的大小调整练习,我总是创建一个excel电子表格列表:

For my own sizing exercises, I've always created an excel spreadsheet listing:

  • col 1:每个将增长的表
  • col 2:估计的列大小(以字节为单位)
  • col 3:估计的行数(每年或最多,取决于应用程序)
  • col 4:索引因子(我总是将其设置为2)
  • 第5列:间接费用系数(我始终将其设置为1.2)
  • 第6列:总计列(第2列X 3 X 4 X 5列)

第6列(总计列)的总和加上没有增长表的数据库的初始大小即为您的大小估计值.您可以获得更多的科学知识,但这是我的快速而肮脏的方法.

The sum of col 6 (total column), plus the initial size of your database without growth tables, is your size estimate. You can get much more scientific, but this is my quick and dirty way.

这篇关于估计数据库大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 15:47