Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Index Rebuild Taking too Long?


Index Rebuild Taking too Long?

Author
Message
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8259 Visits: 14368
ONLINE=ON is an Enterprise feature.

The rebuild operation, even with ONLINE=ON, can be blocked depending on the iso level and what is using that table...but 10 hours would be a seriously long running transaction and it would be surprising that if something like that were going on that it was not impacting anything else in the system besides this one rebuild attempt.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
dkschill
dkschill
SSC-Addicted
SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)

Group: General Forum Members
Points: 459 Visits: 430
Yes. We are using Enterprise. It is just odd that it leads to a lot of blocking though...as soon as the script starts up I see processes marked as Head Blockers in the master database.
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
dkschill (4/9/2013)
I will see if I can get a backup restored to another box, and see if the same issue shows up...and if it does then I will make adjustments to the restored db to see if I can get at root cause.

If I find anything I will be sure to post it here.

Thanks for the help!
-Dane


Incase if you haven't tried this :

i ) Check if there is any blocking while you are rebuilding.

ii) Run read/Write per sec perfmon counter against the drive on which the database is on while you are rebuilding the index.

Let us know how it goes.
dkschill
dkschill
SSC-Addicted
SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)

Group: General Forum Members
Points: 459 Visits: 430
Just ran a reorg and it finished in less than second...tried the rebuild and it immediately created a backup on the master database. I will have to wait until Saturday night before I can run the rebuild for any length of time (and I will be sure to gather the metrics then).

Thanks for all the help and I will be sure to update this topic.

Thanks for the help,
Dane
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
dkschill (4/10/2013)
Just ran a reorg and it finished in less than second...tried the rebuild and it immediately created a backup on the master database. I will have to wait until Saturday night before I can run the rebuild for any length of time (and I will be sure to gather the metrics then).

Thanks for all the help and I will be sure to update this topic.

Thanks for the help,
Dane


I am not following this, what do you mean by ".tried the rebuild and it immediately created a backup on the master database". What does backup of db has anything to do with rebuild?
dkschill
dkschill
SSC-Addicted
SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)

Group: General Forum Members
Points: 459 Visits: 430
Shouldn't cross terms I suppose Smile

I immediately saw a blocking chain on the master database. I found it to be dangerous, because I really wanted to troubleshoot it...

In this case though users are only affected while the rebuild is occurring so I just need to be patient and wait for the next scheduled run.

I don't have enough privileges to restore a backup to another location, and our primary DBAs are currently over booked.

Thanks again,
Dane
Michael Valentine Jones
Michael Valentine Jones
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3262 Visits: 11771
Are you sure this is not a problem with your rebuild script or stored procedure?

What happens if you just run an index rebuild from a query window like this?

ALTER INDEX [PK_item] on [dbo].[item] REBUILD


dkschill
dkschill
SSC-Addicted
SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)

Group: General Forum Members
Points: 459 Visits: 430
At this point I am only running the individual rebuild. With, or with out, (online=on) I get the same results.

Thanks again!
-Dane
crashdan
crashdan
Right there with Babe
Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)Right there with Babe (794 reputation)

Group: General Forum Members
Points: 794 Visits: 757
curious question - how much memory do you have on the machine.
dkschill
dkschill
SSC-Addicted
SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)SSC-Addicted (459 reputation)

Group: General Forum Members
Points: 459 Visits: 430
Here is what I see in sys.dm_os_sys_info:

physical_memory_in_bytes
68718006272

So about 64GBs.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search