Sunday, June 12, 2011

Reindex job and update statistics

When the re-index job(weekly) and update statistics job(daily) are in different schedule, make sure these jobs are running in same time.

ALTER INDEX IX_test_CreatedOn ON dbo.test REORGANIZE
It will block the following:
UPDATE STATISTICS dbo.test IX_test_CreatedOn
Then it will block the other statement for a long period of time(during the re-indexing):
select top 1 * from test
 

No comments:

Post a Comment