How is the memory grant for a DBCC checkdb determined (other than the max size for memory grants which is from resource governor, possibly the default pool)?

I'm not trying to solve a specific problem. I am just curious and trying to understand.


1 Answer 1


It's based on the number of expected pieces of information that CHECKDB will generate and then throw through the query processor to sort and then give back to CHECKDB to reconcile. You can get an idea of the calculation involved from my blog post https://www.sqlskills.com/blogs/paul/how-does-dbcc-checkdb-with-estimateonly-work/.

Jonathan also did some investigations into limiting the memory grants with Resource Governor - see https://www.sqlskills.com/blogs/jonathan/dbcc-checkdb-execution-memory-grants-not-quite-what-you-expect/.

Hope those help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.