Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Rebuild v Reorganise

Author  Topic 

ColinD
Starting Member

40 Posts

Posted - 2011-02-01 : 06:25:36
I have a table with about 120,000 records which seems to work fine with my application, but when I run a reorganise index from my maintenance plan, it always hangs on the table. The result is that the table is locked and cannot be accessed by my application. However, if I take out reorganise and replace it with rebuild, it works fine and does not hang the table.

Anybody got any suggestions as to why this might be happening? I assume that it's because reorganise works with the index online, but rebuild takes it offline. Are there any implications to me using rebuild instead of reorganise? What are the main differences?

Also, when I "view history" of the rebuild, it appears to take just seconds to run before it completes successfully. Does this sound correct? I have it configured to rebuild indexes only my database which is around 900mb.

Thanks for any advice

Colin

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2011-02-01 : 07:17:38
Rebuild is basically the same as a drop/create while reorganize would be the same as a defrag. A rebuild will lock the entire table for the duration of the rebuild while a reorganize is an online operation.

Read about the ALTER INDEX statement here:
http://msdn.microsoft.com/en-us/library/ms188388.aspx

- Lumbago
My blog-> www.thefirstsql.com
Go to Top of Page
   

- Advertisement -