Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回所有连接的内存诊断统计信息的汇总(前提是数据库服务器启用了请求计时记录)。
sa_performance_statistics( )
返回数据库的 ID 编号。
返回连接的 ID 编号。
如果 Type 是 Server,则返回 NULL。
sa_performance_statistics 系统过程返回一个包含一组内存诊断统计信息的结果集(前提是已通知服务器搜集这些信息)。在调用 sa_performance_statistics 之前,必须在数据库服务器上打开内存诊断统计信息的记录。要达到此目的,可在启动数据库服务器时指定 -zt 选项,也可执行以下内容:
CALL sa_server_option( 'RequestTiming','ON' );
DBA 特权
无
以下示例将所有性能统计信息卸载到名为 dump_stats.txt 的文本文件:
UNLOAD SELECT CURRENT TIMESTAMP, * FROM sa_performance_statistics() TO 'dump_stats.txt' APPEND ON;