Slide 18
Slide 18 text
利⽤イメージ(V$SQL_HISTORYビュー)
SQL履歴の監視とレポート
Copyright © 2024, Oracle and/or its affiliates
18
SQL> alter system set SQL_HISTORY_ENABLED = TRUE ;
SQL> select col3,avg(id) from t2 group by col3;
...
SQL> select sql_id, elapsed_time, cpu_time, physical_read_bytes, user_io_wait_time, sql_text
2 from V$SQL_HISTORY order by 2;
SQL_ID ELAPSED_TIME CPU_TIME PHYSICAL_READ_BYTES USER_IO_WAIT_TIME SQL_TEXT
------------- ------------ --------- ------------------- ----------------- --------------------------------------------------
1261gvnxmdgan 0 0 0 0 alter system set SQL_HISTORY_ENABLED = TRUE
6u5zqzz2nm55c 3 3 0 0 SELECT DECODE(USER, 'XS$NULL', XS_SYS_CONTEXT('XS
$SESSION','USERNAME'), USER) FROM SYS.DUAL
fjy3hvnt2x1h2 10 10 0 0 select sql_id,elapsed_time,cpu_time,physical_read_
bytes,user_io_wait_time,sql_text from v$sql_histor
fjy3hvnt2x1h2 11 11 0 0 select sql_id,elapsed_time,cpu_time,physical_read_
bytes,user_io_wait_time,sql_text from v$sql_histor
7jmwzc81n3t9w 21 0 0 0 select col3,avg(id) from t2 group by col3
...