I am trying to get fragmentation information on a few tables which are over 500 GB and I am using the
...DETAILED option of
sys.dm_db_index_physical_stats. I am doing this on a restore copy of the production database on our pre-Prod server so I don't care about hurting any performance on the server.
I ran it and it looks like it is running in serial and it is taking forever. Is there a way to run
dm_db_index_physical_stats() in parallel? Or is any other setting interfering with it?
DBCC TRACEON (8649) and
OPTION(USE HINT('ENABLE_PARALLEL_PLAN_PREFERENCE')) are not available in SQL Server 2014.
DBCC SETCPUWEIGHT(1000); from Paul White's blog here. The blog mentions about parallelism inhibitor and one of which is system tables. Is
dm_db_index_physical_stats() considered a system table?