March 16, 2016 at 9:52 pm
We have a huge database of 2TB and one of the table with size of around 600GB.For simplicity say its partitioned across 12 partitions(per month)
If we are running an index rebuild without specifying to rebuild based on partition number and offline (without online rebuild option) and the command just keeps running for few hours so,
Is there a way/script to cheek how much rebuild is completed with respect to each partition? And how many partitions are remaining to rebuilt?
March 16, 2016 at 9:58 pm
Apologies for the observation but with all the alphabet soup after your name, you don't know?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 17, 2016 at 3:18 am
If you specify the rebuild without specifying the partition, then you're getting a full index rebuild. It's not done one partition at a time, it's done as one operation on the entire index in one go. If you want to rebuild one partition at time, you need to specify the index rebuilds one partition at a time.
Typically tables that are partitioned across months have static data in the older partitions. If that's the case here, why are you wasting time by rebuilding the entire thing rather than just rebuilding the partitions that need it.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 17, 2016 at 8:18 am
Hi Gail,
Many thanks for your time and help..!
We accidentally ran index rebuild without mentioning the partition number and it was just not finishing..and not letting us to decide whether we should wait for it to complete or kill it.
So was just wondering if we have any DMV to check the status partition wise..
March 17, 2016 at 9:28 am
Apologies Jeff...but being certified with these doesnt mean one should know everything about SQL Server .. :ermm:
April 17, 2016 at 4:44 pm
The quick answer is yes.
Google-Foo to the rescue.
Index Report:
http://www.sqlservergeeks.com/sql-server-engine-estimated-time-to-complete-online-index-operations/
Long Running Processes:
SQL Cant estimate an actual rebuild completion time so get current running time.
http://dba.stackexchange.com/questions/76375/check-progress-of-alter-index-reorganize-rebuild
Google-foo CHOP!
April 28, 2016 at 11:18 pm
Thanks
SQL database is best option for Utah Motivational Speaker websites.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply