Friday, March 30, 2012

Need help approximating how much hard drive space I need for my DB table.


In our SQL Server database we will have a table that will be populated with about 2000 records
per day. That is2000 records per day for 5 days per week. Currently the computer we are using has about 50 gigabytes
of available hard drive space on it. We are concerned that maybe we will need a bigger hard drive,
based solely on the number of records entered into this table per day. The problem is I don't
know how to calculate how much hard drive space we need. I think I read that using varchar,
sql server 2005 really optimizes a database. Here is a typical example of data in our
database. I put dots on three lines between the first and last sample record to just
illustrate that there are many records in between.

Basically we only need 8 months of data at a time in the table and then we can purge
records older than 8 months.
Can someone help me approximate how much hard drive space I might need for 8 months of data,
given the following sample record in the database?

Sample: -->34.5 4.08 10.6 .0012


Sample Table in my DB just for illustration:

(PPsquare inch) (Diameter) (Weight gm) (coeffOfSatFriction)

34.5 4.08 10.6 .0012
.
.
.
21.7 3.54 6.22 .019

Why dont you monitor your db size. Get the size on a sunday evening and check the same information on friday evening, you will see how much your db has increased. monitor this over a couple of week and you will get a better estimate. Also, create a job that will alert you if the db size reaches 70% of allocated space.|||Well actually right now we are in design mode and no dat is in the database yet. The software to populate the tables in the database has not even be written at this point in time. Basically we are required to calculate the estimated hard drive space over an 8 month period. Then based on the approximated database size we will make a decision from there. So I need to figure out a way to calculate a good estimate of the size of that data table in the database. I don't know if SQL server does any type of data compression if necessary?|||

Hi,

The estimate depends entirely on the type of data you want to store. For an article on data types sizes, you can have a look at this article:

http://msdn2.microsoft.com/en-us/library/ms187752.aspx

Based on the sample in your post, you could use a decimal with a precision of 9 (http://msdn2.microsoft.com/en-us/library/ms187746.aspx for decimal data type) which takes 5 bytes for each field. So, your estimate would be something like this:

5 (bytes) x 4 (fields) x 2000 (records) x 5 (days) x 36(approx 36 weeks in 8 months) = 7 200 000 bytes = 6.87 Megs of data. So those 50 gigs of data would be more than enough to keep your table.Smile

|||

Thank you very much for the help!

Kind regards

No comments:

Post a Comment