From b26f1c679fd714b9af25b46f77068f40812f34fe Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Wed, 19 Nov 2025 16:52:32 +0100 Subject: [PATCH] top sql format date humain --- sql/41_sql_stat.sql | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sql/41_sql_stat.sql b/sql/41_sql_stat.sql index 793c038..849ae53 100644 --- a/sql/41_sql_stat.sql +++ b/sql/41_sql_stat.sql @@ -1,21 +1,18 @@ prompt

Top SQL

-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