Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unable to Rebuild or Reorganize an Index Expand / Collapse
Author
Message
Posted Monday, November 12, 2012 12:25 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC 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
Post #1383818
Posted Monday, November 12, 2012 12:52 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-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

Post #1383831
Posted Monday, November 12, 2012 1:01 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC 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!
Post #1383839
Posted Tuesday, November 13, 2012 1:51 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

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
Post #1384286
Posted Tuesday, November 13, 2012 1:58 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC 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
Post #1384289
Posted Tuesday, November 13, 2012 2:00 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC 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

Post #1384290
Posted Tuesday, November 13, 2012 2:05 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-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

Post #1384293
Posted Tuesday, November 13, 2012 2:06 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-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

Post #1384294
Posted Tuesday, November 13, 2012 11:18 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld 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 .


-----------------------------------------------------------------------------
संकेत कोकणे
Post #1384393
Posted Wednesday, November 14, 2012 12:33 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr 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.
Post #1384811
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse