query to check cpu utilization in oracle database

Solutions on MaxInterview for query to check cpu utilization in oracle database by the best coders in the world

showing results for - "query to check cpu utilization in oracle database"
Alex
26 Nov 2019
1SELECT PARSING_SCHEMA_NAME, MODULE, SQL_ID, 
2	   round(((CPU_TIME / 1e6) / 60), 2) AS CPU_TIME,
3       EXECUTIONS, ROWS_PROCESSED, DISK_READS, FIRST_LOAD_TIME,
4       LAST_LOAD_TIME, OPTIMIZER_COST, SQL_FULLTEXT
5FROM V$SQLAREA
6WHERE PARSING_SCHEMA_NAME IN ('schema_name')
7ORDER BY PARSING_SCHEMA_NAME, CPU_TIME DESC;
Jonathan
24 Jan 2018
1SELECT ss.USERNAME, se.SID, se.VALUE / 100 CPU_USAGE_SECONDS
2FROM V$SESSION ss, V$SESSTAT se, V$STATNAME sn
3WHERE se.STATISTIC# = sn.STATISTIC#
4  AND NAME LIKE '%CPU used by this session%'
5  AND se.SID = ss.SID
6  AND ss.STATUS = 'ACTIVE'
7  AND ss.USERNAME IS NOT NULL
8ORDER BY VALUE DESC;