question

lumiga avatar image
lumiga asked

Is DBCC CHECKDB is it taking more time than usual? How to tune it?

In the last 30 days, the database size has grown 5% and is now 1.6 Tb, and DBCC CHECKDB time has grown 100%, taking 13h. However, the io path didn't change.

I compared the DBCC CHECKDB with the other VLDBs, and the DBCC CHECKDB time is 2h10 for 1,1 Tb.

sql server 2017checkdb
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Jeff Moden avatar image
Jeff Moden answered

DBCC CHECKDB TRIES to create a "snapshot" to allow concurrency while it's running. If it cannot, then it will take locks on things that it's checking. If it can't get a lock, then it'll wait until it can.

Please see the following and the embedded links for more information.

https://learn.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-checkdb-transact-sql#internal-database-snapshot

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.