Home > Archive > MS SQL Server > October 2006 > dbcc dbreindex and update of statistics









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dbcc dbreindex and update of statistics
Dodo Lurker

2006-10-24, 6:31 pm


I have to set up a nightly job on my database to drop and reindex indexes
on my tables. I am going to use dbcc dbreindex. Does the dbcc dbreindex
also update the statistics on the rebuilt index or do I have to then issue
an update statistics on the table?


Tom Moreau

2006-10-24, 6:31 pm

Index stats are updated automatically when you do a DBCC DBREINDEX.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada

"Dodo Lurker" <none@noemailplease> wrote in message
news:s76dnQMf_dnbF4n
YnZ2dnUVZ_rqdnZ2d@co
mcast.com...

I have to set up a nightly job on my database to drop and reindex indexes
on my tables. I am going to use dbcc dbreindex. Does the dbcc dbreindex
also update the statistics on the rebuilt index or do I have to then issue
an update statistics on the table?



Tracy McKibben

2006-10-24, 6:31 pm

Dodo Lurker wrote:
> I have to set up a nightly job on my database to drop and reindex indexes
> on my tables. I am going to use dbcc dbreindex. Does the dbcc dbreindex
> also update the statistics on the rebuilt index or do I have to then issue
> an update statistics on the table?
>
>


Consider using this script, it will rebuild only those indexes that are
badly fragmented, and you can control the method used...

http://realsqlguy.com/serendipity/a...-A-Wall....html



--
Tracy McKibben
MCDBA
http://www.realsqlguy.com
TRACEY

2006-10-31, 12:15 am

That looks like a great script..
I been trying to run dbcc show contig and then decide which ones need to
have dbcc redindex on them.

What the different from dbcc reindex and DBCC INDEXDEFRAG

is there a way to write this to a report so i can see which ones it does
during the process...thanks


"Tracy McKibben" wrote:

> Dodo Lurker wrote:
>
> Consider using this script, it will rebuild only those indexes that are
> badly fragmented, and you can control the method used...
>
> http://realsqlguy.com/serendipity/a...-A-Wall....html
>
>
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com