You have a SQL Server 2012 instance named SQL\Instance1. Instance1 contains a
database named Database1.
You need to recommend an index defragmentation solution for an index named
ContentIndex. ContentIndex must meet the following requirements:
Remain online during the defragmentation.
Update distribution statistics.
Perform defragmentation as quickly as possible.
Which type of index defragmentation solution should you include in the recommendation?
More than one answer choice may achieve the goal. Select the BEST answer.
A.
DBCC DBREINDEX
B.
REORGANIZE
C.
REBUILD
D.
DBCC INDEXDEFRAG
I believe that REORGANIZE won’t update the statistics and would like longer to complete. So I’ll go for REBUILD.
ALTER INDEX ContentIndex ON Content_Table
REBUILD WITH (ONLINE = ON);
GO
@Kevin, but REBUILD drops and reacreates the complete index. Don’t think it meets the condition to remain online during defragmentation