September 13, 2011 at 9:42 am
I am aware than you can rebuild FTI indexes when the cpu is idle, but is it possible to rebuild all the indexes in the DB, while the cpu is idle?
Thanks
September 13, 2011 at 9:47 am
I'm guessing you're in a 24/7 shop with 0 maintenance window or something like that?
September 13, 2011 at 9:53 am
You can set a CPU idle threshold and schedule a reindex job to run when that threshold is crossed. Of course, by the time the indexing is complete, the level of activity on your database may have changed!
John
September 13, 2011 at 12:13 pm
Thanks!
September 13, 2011 at 1:41 pm
Is this a good reindex query?
Thanks
USE DBName
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR
SELECT table_name FROM information_schema.tables
WHERE table_type = 'base table'
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX(@TableName,' ',90)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor
September 13, 2011 at 2:53 pm
No, but this one is => http://sqlfool.com/2011/06/index-defrag-script-v4-1
September 13, 2011 at 5:06 pm
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply