Search notes:

Oracle: Init parameter TIMED_STATISTICS

Setting timed_statistics to true enabled the collection of timed statistics by the SQL Trace facility (such as column CPU and ELAPSED in TKPROF).
For some statistics found in v$sesstat and v$sysstat to be taken, the value of timed_statistics must be set to true. These statistics include (21c?):
The value of timed_statistics depends on the value of statistics_level, it must be true if statistics_level is not basic.
column name  format a16
column value format a7

select p.name, p.value
from v$parameter p
where p.name in ( 'statistics_level', 'timed_statistics' );
--
-- NAME             VALUE
-- ---------------- -------
-- timed_statistics TRUE
-- statistics_level TYPICAL

alter session set statistics_level = basic;

select p.name, p.value
from v$parameter p
where p.name in ( 'statistics_level', 'timed_statistics' );
--
-- NAME             VALUE
-- ---------------- -------
-- timed_statistics TRUE
-- statistics_level BASIC

alter session set timed_statistics = false;

select p.name, p.value
from v$parameter p
where p.name in ( 'statistics_level', 'timed_statistics' );
--
-- NAME             VALUE
-- ---------------- -------
-- timed_statistics FALSE
-- statistics_level BASIC

alter session set statistics_level = typical;
> ORA-02097: parameter cannot be modified because specified value is invalid
> ORA-00044: timed_statistics must be TRUE when statistics_level is not BASIC

See also

timed_os_statistics
init parameters

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758198965, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/adminstration/init-parameters/timed/statistics(91): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78