December 23, 2013 at 12:39 am
Hi,
DBCC CHECKDB on a ~600GB database and is taking quite a while to complete recently (~20 hrs). It completed in around 2 hrs.
While looking at it, the process running the DBCC CHECKDB command is blocking itself. The lastwaittype says as LATCH_EX and waitresource is DBCC_OBJECT_METADATA ().
Any help to improve this is much appreciated.
Cheers,
December 23, 2013 at 4:52 am
Usually DBCC CHECKDB should be executed during off-peak hours. What is type of server? i.e. prod, dev, test? what is the size of database? Command blocking spid is same as executing? Do you found any error in error log?
Check following link might help you:
HTH
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
December 23, 2013 at 5:26 am
Are you on SQL2008R2 SP2? http://support.microsoft.com/kb/2634571
http://blogs.msdn.com/b/psssql/archive/2012/02/23/a-faster-checkdb-part-ii.aspx
Try DBCC CHECKDB WITH PHYSICAL_ONLY
December 23, 2013 at 7:43 am
free_mascot (12/23/2013)
Usually DBCC CHECKDB should be executed during off-peak hours.
DBCC scheduled to run off-peak hours
What is type of server? i.e. prod, dev, test?
PROD
what is the size of database? Command blocking spid is same as executing? Do you found any error in error log?
~600GB is the size of the DB and the same spid is blocking itself. Of the 17 threads spawned, 7 are blocking itself with the waittype LATCH_EX and the remaining are waiting on CXPACKET
This kind of explains the behaviour. What would be the work around apart from waiting the 20+ hours?
December 23, 2013 at 7:55 am
Blocking by the same process itself is not a big problem .
December 23, 2013 at 7:34 pm
Ratheesh.K.Nair (12/23/2013)
Blocking by the same process itself is not a big problem .
Is there any other way to improve the execution time (has gone from 2 hrs to 20+ hrs) apart from just waiting
July 27, 2015 at 12:56 pm
I have found the exact same issue. Does anyone have a solution yet? On production I am doing a physical_only so the time there is not a problem but I am restoring the backup to another server in order to do a CHECKDB to make sure everything is in order. I pinpointed in down to a single table and the DBCC CHECKTABLE is taking 11 hours on a 1.1 billion row table that has a clustered index on two columns (int, bigint) and a non-clustered index on a single int column. There are no relationships.
Literally 100% latch time is DBCC_OBJECT_METADATA and it is always waiting on CXPACKET. There is a lot more CPU than I/O.
This is running on WS2012 std, SQL2012 SP2 (11.0.5569.0). 4 CPU, 12G.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply