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
 General SQL Server Forums
 New to SQL Server Programming
 calculating table space

Author  Topic 

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-16 : 21:03:55
I currently have 8,000 rows in the orders table and it is estimated that it will have in average 50 orders daily. The orders need to be kept for 6 months, before it is archived and deleted from the database. I calculated the amount of space that needs to be reserved for the table but unsure if I am on the right track in calculating the table size.

would there be anything wrong in my calcultation that i missed?

int
datetime
tinyint
nvarchar(15)
int
int
int
int
money
money
money
money
datetime

4
4
2
15
4
4
4
4
4
4
4
4
4
4
= 65 bytes
+ rowoverhead = 7

total = 72

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-17 : 00:24:02
Also have to take index size into account.
Go to Top of Page

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-17 : 10:04:37
can you explain the index part a bit more?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-17 : 21:09:16
it all depends on how you put indexes on the table, with similar calculation.
Go to Top of Page

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-17 : 22:28:44
do i need to include the calculatoins for the index as well?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-17 : 22:32:59
That's what I said.
Go to Top of Page

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-17 : 22:35:41
where would i get the index from?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-18 : 00:12:32
You have to create them.
Go to Top of Page

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-18 : 01:02:04
How would i go about creating the indexes if only the data types are given to me?

thanks
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-18 : 20:30:18
Depends on what kind of queries run against the table, read books online.
Go to Top of Page

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-19 : 19:26:23
there are no queries running on this table just a table that have 8000 rows and 50 orders kept for 6 months, before they can be archived and deleted from the database. How can i determine the space. is there a way to calculate the rows, row size, page space, etc?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-19 : 23:26:56
If never query them, then why keep them in first place?
Go to Top of Page

lisa_baria03
Yak Posting Veteran

60 Posts

Posted - 2007-11-20 : 10:57:57
just for practicing the question
Go to Top of Page
   

- Advertisement -