|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 2:14 PM
Points: 92,
Visits: 291
|
|
I was hoping to rebuild all indexes on one of our SQL Server 2008 databases over the weekend. The database is used on our campus to record data from numerous monitoring units around our campus. This is a warehouse so it is very large. I tried to rebuild the indexes, but it ran for over 12 hours... so I tried to Reorganize the indexes.... still would not complete. I then tried to individually rebuild the most fragmented indexes. It was working.... then I hit the one that would not finish. How should I handle indexes that will never rebuild? Thank you in advance.
Charlie
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:01 PM
Points: 37,669,
Visits: 29,923
|
|
Were the rebuilds blocked by something?
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 2:14 PM
Points: 92,
Visits: 291
|
|
| To be honest... I did not check... I will test off hours and let you know. Thanks for the advice!
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 1:57 PM
Points: 1,875,
Visits: 1,439
|
|
Hi, You may have space issues for your tempdb, or generally space issues, and then it is slow. Are you rebuilding online or offline?
Regards IgorMi
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 2:14 PM
Points: 92,
Visits: 291
|
|
Hi Gail, Sorry in the delay getting back to you. I ran the test last night from home. The Index rebuild was running and another process was being blocked by the Index Rebuild (checking in Activity Monitor).
Charlie
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 2:14 PM
Points: 92,
Visits: 291
|
|
Hi IgoMi,
I have a lot of Space on the tempdb. The tempdb is located on a SAN. I was Rebuilding offline... then I tried to Reorganize the Index. Still ran forever.
Charlie
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:01 PM
Points: 37,669,
Visits: 29,923
|
|
Is the rebuild/reorg blocked by something else? If so, it will be sitting doing nothing until whatever is blocking it has finished.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:01 PM
Points: 37,669,
Visits: 29,923
|
|
IgorMi (11/13/2012) Hi, You may have space issues for your tempdb, or generally space issues, and then it is slow.
Lack of space will result in either the files growing or the rebuild failing, not it running slow.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 11:21 PM
Points: 323,
Visits: 961
|
|
rummings (11/12/2012) I was hoping to rebuild all indexes on one of our SQL Server 2008 databases over the weekend. The database is used on our campus to record data from numerous monitoring units around our campus. This is a warehouse so it is very large. I tried to rebuild the indexes, but it ran for over 12 hours... so I tried to Reorganize the indexes.... still would not complete. I then tried to individually rebuild the most fragmented indexes. It was working.... then I hit the one that would not finish. How should I handle indexes that will never rebuild? Thank you in advance.
Charlie
Try Ola's Index Optimization script http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
It help me to reduce my time from 12 hours to 2-3 hours for index rebuild/Re-organize .
----------------------------------------------------------------------------- संकेत कोकणे
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Thursday, May 09, 2013 1:13 PM
Points: 516,
Visits: 1,004
|
|
| Our index maintenance process includes a "SET LOCK_TIMEOUT" statement so that if any one index rebuild is blocked longer than the duration, it times out and moves on to the next index.
|
|
|
|