Tuesday, November 17, 2009

SQL Queries : Recursive CPU Usage

Query:
SELECT A.NAME, A.VALUE / B.VALUE CPU_USAGE
FROM V$SYSSTAT A, V$SYSSTAT B
WHERE A.NAME = 'RECURSIVE CPU USAGE'
AND B.NAME = 'CPU USED BY THIS SESSION';

Gives the "amount" of cpu usage for recursive. It includes SQL and PL/SQL. PL/SQL code can lead to high values for this statistic, and thus "mask" the actual state for SQL-statements.

No comments:

Post a Comment