Skip to content

Commit 88c7eab

Browse files
authored
Create find-sqlid.sql
1 parent 0b7df95 commit 88c7eab

File tree

1 file changed

+7
-0
lines changed
  • data-platform/core-converged-db/sql-performance/sql-monitoring/scripts-sql-monitoring

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
REM Script: find-sqlid.sql
2+
REM Find SQL id with V$SQL_MONITOR
3+
4+
-- display text, sql id and cpu time
5+
SELECT distinct s.sql_text, m.sql_id, m.cpu_time
6+
FROM v$sql_monitor m INNER JOIN v$sql s ON s.sql_id=m.sql_id
7+
ORDER BY m.cpu_time;

0 commit comments

Comments
 (0)