GeneralSQL

Thursday, June 16, 2016

Rebuild All indexes and update statistics

http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-and-update-statistics-on-tables/

USE MyDatabase
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GO
EXEC sp_updatestatsGO
Posted by MySql at 10:25 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2021 (1)
    • ►  May (1)
  • ►  2020 (1)
    • ►  June (1)
  • ►  2019 (1)
    • ►  September (1)
  • ►  2018 (15)
    • ►  August (4)
    • ►  July (4)
    • ►  May (2)
    • ►  April (4)
    • ►  February (1)
  • ►  2017 (8)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ▼  2016 (6)
    • ►  October (1)
    • ►  September (1)
    • ►  July (1)
    • ▼  June (2)
      • SQL Server Statistics Questions
      • Rebuild All indexes and update statistics
    • ►  April (1)
  • ►  2015 (18)
    • ►  November (1)
    • ►  October (4)
    • ►  September (2)
    • ►  August (3)
    • ►  July (2)
    • ►  June (1)
    • ►  April (2)
    • ►  March (2)
    • ►  January (1)
  • ►  2014 (56)
    • ►  December (3)
    • ►  October (1)
    • ►  September (23)
    • ►  August (13)
    • ►  July (4)
    • ►  June (1)
    • ►  May (8)
    • ►  April (2)
    • ►  January (1)

About Me

MySql
View my complete profile
Simple theme. Powered by Blogger.