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 Administration
 Tables Physical Size shrink on their own-why?

Author  Topic 

pphillips001
Starting Member

23 Posts

Posted - 2010-04-15 : 03:53:27
I've compared the physical and index sizes (in Kb) of the tables in our database between dates two weeks apart.

Even though the number of rows have increased as expected their physical size has reduced??

We haven't manually DBShrank anything. Anybody any ideas on this?

Cheers.


===========================
There is no reality - only perspective.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-15 : 13:25:00
Did any index rebuilds happen like through an optimizations maintenance plan?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

pphillips001
Starting Member

23 Posts

Posted - 2010-04-15 : 16:58:17
Yep - we run one of those scripts that if it's defragged past a certain threshold then rebuild index else just a reorg.

Would this affect the table data physical size? The index size is listed separately.


===========================
There is no reality - only perspective.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-15 : 19:11:59
Yes it could affect the physical size of a table if you have a clustered index on the table as a clustered index is the table. So if the clustered index gets rebuilt, the table's physical size is impacted as the fragmentation is reduced or eliminated.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

pphillips001
Starting Member

23 Posts

Posted - 2010-04-16 : 04:39:11
Thanks Tara - that'd explain it - I thought I was losing the plot for a moment back there!


===========================
There is no reality - only perspective.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-04-16 : 13:23:20
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -