Avatar of IKtech
IKtech
 asked on

SQL Server 2014 reindex maintenance plans

i have a maintenance plan setup to run a weekly index.  Within the maintenance plan i have a rebuild index task and a reorganize index task.  I just wanted to ask the experts if it is recommended to do both or if i could just use the rebuild task and not worry about reorganizing index task.  

I want to avoid the huge log file that is created when running the reorganizing index task but i don't want to eliminate the reorganizing index task if it is something that will be important.

Also, i should mention that the job that includes reorg and rebuild is failing due to the log file filling up.  Maybe i can change settings for the log file to allow a bigger one and then run the job nightly instead of weekly...

Any thoughts?
Microsoft SQL Server

Avatar of undefined
Last Comment
Vitor Montalvão

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
lcohan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
IKtech

ASKER
Thanks Icohan!!  i'll give it a shot...
lcohan

Just caution with CLUSTERED INDEXES as they can also be rebuilt with ONLINE = ON but...performance may suffer in particular while these ones are done and a decrease in performance should be expected in general while indexes are rebuilt due to resource consumption but if your database is not backend to a 24/7 system you should have no issues to do that during off-hours.

 Also, do not change Recovery option of a production database without checking existing backup/restore and disaster recovery policies internal to your place.
SOLUTION
Vitor Montalvão

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
IKtech

ASKER
I removed the reorg task and just do a rebuild.  Also the max size for the transaction log was increased.  Things seem to be running well at the moment.  Thanks!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
lcohan

Make sure you take regular T-log backups - ideally one as soon as the rebuild is done so the space is recycled/release back to use inside the T-log file.
IKtech

ASKER
it's done hourly...
Vitor Montalvão

I removed the reorg task and just do a rebuild
Technically it's a solution that works but in my opinion this is a waste of resources (CPU, Memory and Storage) and will cause more locks during the rebuild task.
REORG is there for a reason and not using it won't bring any harm but using it will bring benefits in terms of limiting the resource usage.
Cheers
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.