系统统计函数 (Transact-SQL)System Statistical Functions (Transact-SQL)

适用于:Applies to: 是 SQL ServerSQL Server (所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是 SQL ServerSQL Server (所有支持的版本)yesSQL ServerSQL Server (all supported versions)

下列标量函数返回系统的统计信息:The following scalar functions return statistical information about the system:

@@CONNECTIONS@@CONNECTIONS @@PACK_RECEIVED@@PACK_RECEIVED
@@CPU_BUSY@@CPU_BUSY @@PACK_SENT@@PACK_SENT
fn_virtualfilestatsfn_virtualfilestats @@TIMETICKS@@TIMETICKS
@@IDLE@@IDLE @@TOTAL_ERRORS@@TOTAL_ERRORS
@@IO_BUSY@@IO_BUSY @@TOTAL_READ@@TOTAL_READ
@@PACKET_ERRORS@@PACKET_ERRORS @@TOTAL_WRITE@@TOTAL_WRITE

所有的系统统计函数都具有不确定性。All system statistical functions are nondeterministic. 这意味着即使同一组输入值,也不一定在每次调用这些函数时都返回相同的结果。This means these functions do not always return the same results every time they are called, even with the same set of input values. 有关函数确定性的详细信息,请参阅确定性函数和不确定性函数For more information about function determinism, see Deterministic and Nondeterministic Functions.

另请参阅See Also

内置函数 (Transact-SQL)Built-in Functions (Transact-SQL)