Does doing a DBReindex on each table also update all the
statistics on that table as well? I think there can be
index specific statistics as well as non index related
statistics on tables. Do all of these get updated with
DBReindex?
Thanks,
VanHi,
Yes, dbcc dbreindex rebuilds the index and updates the statistics.
BTW, what do you mean by "I think there can be index specific statistics as
well as non index related statistics on tables." ? FYI, statistics are
created only on index.
--
Thanks
Yogish|||As far as I know all stats get updated after a dbcc dbreindex of the
clustered index. You can verify this yourself, by using the DBCC
SHOW_STATISTICS command.
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Van Jones" <anonymous@.discussions.microsoft.com> wrote in message
news:077401c52a66$9fecbc50$a501280a@.phx.gbl...
> Does doing a DBReindex on each table also update all the
> statistics on that table as well? I think there can be
> index specific statistics as well as non index related
> statistics on tables. Do all of these get updated with
> DBReindex?
> Thanks,
> Van|||With autocreate stats option, SQL Server creates statistics on non-indexed
columns also.
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Yogish" <yogishkamathg@.icqmail.com> wrote in message
news:5F149C27-5E46-4CE9-8C4F-C65F84E26988@.microsoft.com...
> Hi,
> Yes, dbcc dbreindex rebuilds the index and updates the statistics.
> BTW, what do you mean by "I think there can be index specific statistics
as
> well as non index related statistics on tables." ? FYI, statistics are
> created only on index.
> --
> Thanks
> Yogish|||Thanks for the replies. I think they all get updated
too. Basically I have a weekly maintenance job that
rebuilds all indexes with DBReindex and I was wondering if
I needed to set up a separate Update Statistics step in it
so that Statistics are updated weekly too. Sounds like
DBReindex will take care of it.
Thanks again,
Van
>--Original Message--
>Does doing a DBReindex on each table also update all the
>statistics on that table as well? I think there can be
>index specific statistics as well as non index related
>statistics on tables. Do all of these get updated with
>DBReindex?
>Thanks,
>Van
>.
>|||On some tables, on which query performance is very important to me, I
schedule UPDATE STATISTICS everyday, with a reindex every week. I do this,
even when auto stats are on.
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Van Jones" <anonymous@.discussions.microsoft.com> wrote in message
news:086101c52a6f$34788fe0$a401280a@.phx.gbl...
> Thanks for the replies. I think they all get updated
> too. Basically I have a weekly maintenance job that
> rebuilds all indexes with DBReindex and I was wondering if
> I needed to set up a separate Update Statistics step in it
> so that Statistics are updated weekly too. Sounds like
> DBReindex will take care of it.
> Thanks again,
> Van
>
> >--Original Message--
> >Does doing a DBReindex on each table also update all the
> >statistics on that table as well? I think there can be
> >index specific statistics as well as non index related
> >statistics on tables. Do all of these get updated with
> >DBReindex?
> >
> >Thanks,
> >
> >Van
> >.
> >|||If you specify the index in the DBCC DBREINDEX command, then only this
index (and statistics of that index) are updated. If you specify DBCC
DBREINDEX without an index name, then all indexes and all non-index
statistics of the table are updated.
HTH,
Gert-Jan
Van Jones wrote:
> Does doing a DBReindex on each table also update all the
> statistics on that table as well? I think there can be
> index specific statistics as well as non index related
> statistics on tables. Do all of these get updated with
> DBReindex?
> Thanks,
> Van
No comments:
Post a Comment