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|||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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment