top sql format date humain
This commit is contained in:
@@ -1,21 +1,18 @@
|
|||||||
prompt <h2>Top SQL</h2>
|
prompt <h2>Top SQL</h2>
|
||||||
|
|
||||||
alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
|
|
||||||
|
|
||||||
select /* db-html-report */
|
select /* db-html-report */
|
||||||
* from (
|
* from (
|
||||||
select
|
select
|
||||||
a.inst_id,
|
a.inst_id,
|
||||||
a.sql_id,
|
a.sql_id,
|
||||||
round(a.elapsed_time / 1000000) as elapsed,
|
to_char(numtodsinterval(a.elapsed_time/ 1000000, 'SECOND'), 'HH24:MI') as elapsed,
|
||||||
substrb(replace(a.sql_text,'',' '),1,55) as sql_text,
|
substrb(replace(a.sql_text,'',' '),1,55) as sql_text,
|
||||||
round(a.cpu_time / 1000000) as cpu_time,
|
|
||||||
a.buffer_gets, -- Lecture en memoire
|
a.buffer_gets, -- Lecture en memoire
|
||||||
a.disk_reads, -- Lecture sur disque
|
a.disk_reads, -- Lecture sur disque
|
||||||
a.physical_read_bytes,
|
round(a.physical_read_bytes /1024/1024) as physical_read_MB,
|
||||||
a.executions,
|
a.executions,
|
||||||
a.rows_processed,
|
a.rows_processed,
|
||||||
a.last_active_time, -- Last time the statistics of a contributing cursor were updated
|
to_char(a.last_active_time, 'DD/MM/YYYY HH24:MI:SS') as last_active_time, -- Last time the statistics of a contributing cursor were updated
|
||||||
b.module
|
b.module
|
||||||
from gv$sqlstats a, gv$sql b
|
from gv$sqlstats a, gv$sql b
|
||||||
where a.sql_id=b.sql_id
|
where a.sql_id=b.sql_id
|
||||||
|
|||||||
Reference in New Issue
Block a user