CPU Usage


/*V$SYSSTAT shows Oracle CPU usage for all sessions. The statistic "CPU used by this session" actually shows the aggregate CPU used by all sessions*/

 select value from v$sysstat s, v$statname n where s.statistic# = n.statistic#
 and  n.name = 'CPU used by this session';
 
 /*V$SESSTAT shows Oracle CPU usage per session. You can use this view to see which particular session is using the most CPU*/ 

 select sum(value) all_sess_cpu from v$sesstat s, v$statname n where s.statistic# = n.statistic#
 and  n.name = 'CPU used by this session';
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: