Avatar of Vijay
Vijay
 asked on

Rebuild Indexes on SQL Server 2016

Hi,

What is the fastest way to rebuild indexes on SQL Server 2016 Ent.? This is standalone server. no other applications are running.

We are planning to rebuild indexes on around 70 DBs, each DB contains 3 tables and each table having billions of rows.
Microsoft SQL Server* SSMS

Avatar of undefined
Last Comment
Vijay

8/22/2022 - Mon
Vitor Montalvão

There's no miracle solution. You'll need to reindex index by index.
I recommend you to download Ola's maintenance script and run it in your SQL Server instance. It will create a reindex job and only thing you have to do is to run the job manually or schedule it to run during no activity period (usually night and weekends).
PortletPaul

and amongst Ola's wonderful work are scripts to monitor the indexes so you minimize these major rebuild events :)

no points please
Zberteoc

Absolutely the BEST way, Ola's scripts! The BIG advantage compared with the SQL Maintenance plan is that it will NOT do this fragmentation if it is not necessary! Disclaimer: I am not aware if this was introduced to versions greater than SQL 2012!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Vijay

ASKER
Is it necessary recompile all Stored Procedures after index rebuild/reoranize?
ASKER CERTIFIED 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.
Vijay

ASKER
Good information.