Link to home
Start Free TrialLog in
Avatar of saratcm
saratcmFlag for India

asked on

Rebuild & Reorg Indexes in SQL Server

Hi All,
 I tried to defrag my indexes on a particular table by trying  REBUILD(DBREBUILD) & REORG(INDEXDEFRAG).
Don't know the reason it is taking more time to execute and I tried to see how much timeit may take, I Observer even after like 2 hrs of start time, it keep on executing.
What might be the reason and how can I get rid of this and defrag my Indexes?
I have to Defrag those Indexes, as we have user reporting about the reports taking more time to execute.

Will it work if I try to schecule a REORGNIZE the Indexes using the Maintanence Paln?
Avatar of chapmandew
chapmandew
Flag of United States of America image

Which operation are you running?
Avatar of saratcm

ASKER

I tried first running REBUILD & waited to see until 1hr,
After I tried REORG and still it is keep on executing form 2hrs.
So stopped that too & found only 39% completed.
Rebuild is an offline operation, so it will block all table operations. Don't run during busy times. How large is your db?
Avatar of saratcm

ASKER

Yes, I runnned it in the night during our window timings only and since it is taking a while, I thought of giving a try with Reorg as it is a online operation.
How large is your db?
Avatar of saratcm

ASKER

60 GB/ 10GBis free in that
ASKER CERTIFIED SOLUTION
Avatar of mdagis
mdagis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of saratcm

ASKER

Thanks!