March 12, 2012 at 2:55 pm
The database size of one of our databases is 75GB ( though it still has 30G more free space) and it is growing fast. I am looking into shrinking this database because the HD has only 7G free space now. Before I perform the shrink I am trying to find out if there are any free spaces.
In order to find that I am running a script to find the size of the individual table using
EXEC sp_spaceused @TableName
Is the table size = data size + index size ?
Thank you!
March 12, 2012 at 3:24 pm
Yes.
Here is a less ambiguous script to get table size information.
http://jasonbrimhall.info/2011/11/21/table-space-cs-part-deux/
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 12, 2012 at 4:16 pm
Guras (3/12/2012)
The database size of one of our databases is 75GB ( though it still has 30G more free space) and it is growing fast. I am looking into shrinking this database because the HD has only 7G free space now. Before I perform the shrink I am trying to find out if there are any free spaces.In order to find that I am running a script to find the size of the individual table using
EXEC sp_spaceused @TableName
Is the table size = data size + index size ?
Thank you!
How fast is the database growing?
If you shrink the database, you will fragment the indexes requiring that you then rebuild them. This will result in the database growing again (of course it may not grow back to 75GB). Then it will continue to grow as more data is added.
Just some food for thought.
March 13, 2012 at 9:16 am
Lynn Pettis (3/12/2012)
Guras (3/12/2012)
The database size of one of our databases is 75GB ( though it still has 30G more free space) and it is growing fast. I am looking into shrinking this database because the HD has only 7G free space now. Before I perform the shrink I am trying to find out if there are any free spaces.In order to find that I am running a script to find the size of the individual table using
EXEC sp_spaceused @TableName
Is the table size = data size + index size ?
Thank you!
How fast is the database growing?
If you shrink the database, you will fragment the indexes requiring that you then rebuild them. This will result in the database growing again (of course it may not grow back to 75GB). Then it will continue to grow as more data is added.
Just some food for thought.
The DB grew by 6 GB in past 3 months..so it's about 2G in every month..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply