SQL 服务器服务代理性能指标

SQL Server Service Broker Performance Metrics

我正在查看 sys.dm_os_performance_counters table 以了解 Service broker 的性能指标。下面是查询:

select * from sys.dm_os_performance_counters  
         where object_name = 'SQLServer:Broker Statistics'

令人困惑的是,我得到了相同的值 SQL SENDs/sec & SQL 发送总数

以及 SQL RECEIVEs/sec & SQL 的相同值

请解释为什么这些值相同?

该视图公开了原始值。您需要根据counter type. See Interpreting the counter values from sys.dm_os_performance_counters:

进行调整

For per-second counters, this value is cumulative. The rate value must be calculated by sampling the value at discrete time intervals. The difference between any two successive sample values is equal to the rate for the time interval used.