Sunday, March 11, 2012

another question - shrinking

How can I tell if my database can gain by using dbcc
shrinkdatabase and the notruncate option?
TIA,
JBhttp://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"JB" <anonymous@.discussions.microsoft.com> wrote in message
news:613801c49281$50f645d0$a301280a@.phx.gbl...
> How can I tell if my database can gain by using dbcc
> shrinkdatabase and the notruncate option?
> TIA,
> JB|||In te article it mentions "When you shrink a data file,
SQL Server will first move pages towards the beginning of
the file."
I suppose my question is 'Does this improve performance?'.
TIA,
JB|||No it decreases performance since it will fragment the indexes when it moves
them. The reason it moves the data to the beginning of the file is because
it shrinks the file from the end. It can't shrink the file if there is data
in that portion of the file so it has to move it to the beginning. This is
a very costly operation and will only decrease performance not increase it.
--
Andrew J. Kelly SQL MVP
"JB" <anonymous@.discussions.microsoft.com> wrote in message
news:5f5d01c49289$4164dac0$a501280a@.phx.gbl...
> In te article it mentions "When you shrink a data file,
> SQL Server will first move pages towards the beginning of
> the file."
> I suppose my question is 'Does this improve performance?'.
> TIA,
> JB

No comments:

Post a Comment