Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

dbcc shrinkfile time estimate Expand / Collapse
Author
Message
Posted Thursday, May 13, 2010 6:11 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 15, 2013 6:10 AM
Points: 19, Visits: 115
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
Post #921169
Posted Thursday, May 13, 2010 6:42 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:41 AM
Points: 42,827, Visits: 35,957
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 2008, MVP
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

Post #921194
Posted Thursday, May 13, 2010 6:53 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 15, 2013 6:10 AM
Points: 19, Visits: 115
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
Post #921208
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse