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
 Indexes -> shrank from 8GB to 2.5GB and back

Author  Topic 

wakko303
Starting Member

7 Posts

Posted - 2008-05-13 : 09:39:50
Hi All,

I customer told me the following about his database:

After rebuilding the indexes, the db size shrank from 8GB to 2.4GB. Within 3 days use, the DB was back up to 8GB... Is this normal??

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-13 : 10:28:37
Could be. Do you do a lot of staging?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-13 : 10:39:47
"After rebuilding the indexes, the db size shrank from 8GB to 2.4GB."

Maybe you turned 'Autoshrink ON' on database properties
Go to Top of Page

wakko303
Starting Member

7 Posts

Posted - 2008-05-13 : 11:07:46
@Peso: Do you mean if they are using staging tables and when they are deleting the records, they should use TRUNCATE instead of DELETE?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-13 : 11:08:48
Truncate would be a better choice, yes.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -