How do I get the size of a Service Broker Queue quickly when the table is >500k rows?

吃可爱长大的小学妹 提交于 2019-12-08 10:54:15

问题


I'm trying to determine the total size of a Service Broker Queue and transmission queue when the queue is very large. The problem is traditional querys like the ones below don't work since it's not a table. Any ideas?

EXEC sp_spaceused 'sys.transmission_queue'
SELECT rows FROM sysindexes WHERE id = OBJECT_ID('ConfigMgrDrsQueue') AND indid < 2  

回答1:


Remus explains explains how to do it in his blog. Basically you need to query the row count of the underlying b-tree.



来源:https://stackoverflow.com/questions/2807309/how-do-i-get-the-size-of-a-service-broker-queue-quickly-when-the-table-is-500k

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!