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


dbcc shrinkfile time estimate


dbcc shrinkfile time estimate

Author
Message
Saronabound
Saronabound
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 120
We have a 500GB primary datafile that has over 140GB free space due to the deletion of archival data. I have heard pros and cons about using shrinkfile. I would like to get any opinions about using shrinkfile, and if anyone has a time estimate to shrink a file this size.

Thanks,
Keith
GilaMonster
GilaMonster
SSC Guru
SSC Guru (226K reputation)SSC Guru (226K reputation)SSC Guru (226K reputation)SSC Guru (226K reputation)SSC Guru (226K reputation)SSC Guru (226K reputation)SSC Guru (226K reputation)SSC Guru (226K reputation)

Group: General Forum Members
Points: 226246 Visits: 46324
How long is a piece of string?

Seriously, there's no way, just from the size of the DB, to make any educated guess as to the time to shrink. Depends on IO subsystem, amount and distribution of free space, type of pages (LOB, data, row overflow), usage of server, etc.

Before you consider shrinking, is that space likely to be reused on a reasonable amount of time? If so, rather don't shrink. Free space won't make your backups large or slow down queries and, if you shrink, you'll need to rebuild all your indexes afterwards.

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


Saronabound
Saronabound
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 120
Thanks for the quick response.
We would rather not shrink the file, as you said, all indexes would have to be rebuilt.
This is an older system, 32 bit Windows.
The reason we were considering it is the disk it is on will be filled up in the near future.
autoextend is set to 10%. We could reduce this so the file does not grow.
One other question, at what point does the datafile extend. Is there a way to see at what percent
the file usage gets to when it extends.

Keith
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