top sql format date humain

This commit is contained in:
Yacine31
2025-11-19 16:52:32 +01:00
parent 0180e31523
commit b26f1c679f

View File

@@ -1,21 +1,18 @@
prompt <h2>Top SQL</h2>
alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
select /* db-html-report */
* from (
select
a.inst_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,
round(a.cpu_time / 1000000) as cpu_time,
a.buffer_gets, -- Lecture en memoire
a.disk_reads, -- Lecture sur disque
a.physical_read_bytes,
round(a.physical_read_bytes /1024/1024) as physical_read_MB,
a.executions,
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
from gv$sqlstats a, gv$sql b
where a.sql_id=b.sql_id