SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Faster way to release the Unused Space back to Disk


Faster way to release the Unused Space back to Disk

Author
Message
dan-572483
dan-572483
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3487 Visits: 2000
This is the second time? If you shrink a database at all, it should be one-off job following a one-off large data deletion. If it grows "too large" again, then the DB needs extra space for its operations.

One thing to look at is if the autogrow settings are too large. If you have a 5GB DB set to grow 5GB at a time and it results in 48% free space, then you might want to shrink again (to a size that that includes a more reasonable amount of free space), then set the autogrowth smaller to a setting that allows for growth but makes growths unlikely to happen very often.
Mac1986
Mac1986
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1405 Visits: 791
I have done the things that you have suggested but still in the next ETL run, again the Datafile size is boosted up and used space by the file is way less.

Can you please suggest. What can be done now..
crazy4sql
crazy4sql
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4091 Visits: 4514
why dont you change your recovery model to "bulk logged" while your ETLs are scheduled?

----------
Ashish
GilaMonster
GilaMonster
SSC Guru
SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)

Group: General Forum Members
Points: 218875 Visits: 46279
Mac1986 (12/21/2012)
I have done the things that you have suggested but still in the next ETL run, again the Datafile size is boosted up and used space by the file is way less.

Can you please suggest. What can be done now..


If the space in the data file is used up and the file grows during ETL, then leave the data file alone, it needs to be the size it is.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


GilaMonster
GilaMonster
SSC Guru
SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)

Group: General Forum Members
Points: 218875 Visits: 46279
crazy4sql (12/21/2012)
why dont you change your recovery model to "bulk logged" while your ETLs are scheduled?


Not going to affect the size or usage of the data file in any way.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


crazy4sql
crazy4sql
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4091 Visits: 4514

Not going to affect the size or usage of the data file in any way.


sorry for my Friday hangover, I thought the complain is about log file Smile

----------
Ashish
Mac1986
Mac1986
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1405 Visits: 791
I have 2 quick questions on Data file size usage behavior

1) I see that Indexes have heavy fragmentation levels: This effects the DML Performance for sure, but will this allow the data file size to grow extra than actual consumed space?

2) Will adding few indexes at appropriate places reduce the Data file to not pre capture so much disk space than actual consumed space.?
Bhuvnesh
Bhuvnesh
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12928 Visits: 4077
Mac1986 (1/2/2013)
1) I see that Indexes have heavy fragmentation levels: This effects the DML Performance for sure, but will this allow the data file size to grow extra than actual consumed space?

NO there is no 'extra' or 'actual consumed' kind of thing in index fragmentation level. framentation happens due to page split whch is dependent on fill factor.

Mac1986 (1/2/2013)
(2) Will adding few indexes at appropriate places reduce the Data file to not pre capture so much disk space than actual consumed space.?
NO. index addition always cost you space/disk and it helps you to retrieve the data faster but slow down your DML operation

for more details see this link http://blogs.msdn.com/b/pamitt/archive/2010/12/23/notes-sql-server-index-fragmentation-types-and-solutions.aspx

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search