Oracle 参数 TIMED_STATISTICS 官方解释,作用,如何配置最优化建议

本站中文解释

TIMED_STATISTICS:该参数设置为TRUE,会收集客户端的发出的每个SQL的处理时间以秒为单位,该参数的时间越大值越精确;该参数设置为FALSE,表示关闭该参数,不进行收集。

正确设置TIMED_STATISTICS:
1. 若要使参数生效,需要进行数据库重启;
2. 通过ALTER SYSTEM将TIMED_STATISTICS=TRUE,启动收集;
3. 通过V$SESSTAT视囑查看收集的信息;
4. 当一个数据库SQL调优工作完成后,最好将参数重新设置为False值;

官方英文解释

TIMED_STATISTICS specifies whether statistics related to time are collected.

Property Description

Parameter type

Boolean

Default value

If STATISTICS_LEVEL is set to TYPICAL or ALL, then true

If STATISTICS_LEVEL is set to BASIC, then false

Modifiable

ALTER SESSION, ALTER SYSTEM

Modifiable in a PDB

Yes

Range of values

true | false

Basic

No

Values

  • true

    The statistics are collected and stored in trace files or displayed in the V$SESSTATS and V$SYSSTATS dynamic performance views.

  • false

    The value of all time-related statistics is set to zero. This setting lets Oracle avoid the overhead of requesting the time from the operating system.

Starting with release 11.1.0.7.0, the value of the TIMED_STATISTICS parameter cannot be set to false if the value of STATISTICS_LEVEL is set to TYPICAL or ALL.

On some systems with very fast timer access, Oracle might enable timing even if this parameter is set to false. On these systems, setting the parameter to true can sometimes produce more accurate statistics for long-running operations.

See Also:

  • Oracle Database SQL Tuning
    Guide
    for more information on setting this parameter

  • Statistics Descriptions indicates which statistics depend on the setting of this parameter.


数据运维技术 » Oracle 参数 TIMED_STATISTICS 官方解释,作用,如何配置最优化建议