Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Hosting and DB size

Author  Topic 

doubleotwo
Yak Posting Veteran

69 Posts

Posted - 2010-09-28 : 10:31:28
Im working on a program that plans rooms and such....

my database is now 12.5 MB with olmost no planning, only tables for other data

this is done by administrators... i roughly guess 40 of them..
these admins have all an individial schedule wich gets inserted into the database
this schedule gets inserted always when some1 queries a certain week

this week is represented by like 20 row of 40 fields, from wich a varchar 40 is kinda the biggest...
why 20, cuz the planning is done on a 2 hour bases.... so 4 planitems in 1 day ... 4* 5 = 20

so i need to know how big 1 year of planning is like in MB terms....

so 52weeks * (20*5) * fields....

anyone here can help me with this, i need to choose hosting of a db with 50MB diskspace 100 or 200

tpowell_3557
Starting Member

9 Posts

Posted - 2010-09-28 : 12:03:40
You can use INFORMATION_SCHEMA.COLUMNS to get the datatypes & sizes for the columns. Then when you have a max row size just multiply by the number of rows you expect in a year.

Empirically you could add 10 test rows and use sp_SpaceUsed 'MySchema.MyTableName' to confirm and then calculate size based on the number of rows you expect in a year.

sp_SpaceUsed Output:

name rows reserved data index_size unused
Batch 262437 153096 KB 152704 KB 424 KB 0 KB


Tom
Go to Top of Page

doubleotwo
Yak Posting Veteran

69 Posts

Posted - 2010-09-29 : 03:25:46
i get 2 query results

database_name database_size unallocated space
db.MDF 12.25 MB 4.54 MB

and

reserved data index_size unused
5592 KB 3488 KB 1744 KB 360 KB

kinda big difference between it ... what should i use to compare it with the hosting DB size ?
Go to Top of Page

doubleotwo
Yak Posting Veteran

69 Posts

Posted - 2010-09-29 : 03:57:00
i estimated it at roughly 300MB ( of reserved space using rule of 3 on the reserved space of 600rows)

i get 104000 rows .. with ~20fields, this seem reasonable ?
Go to Top of Page
   

- Advertisement -