Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How do I get a list of most resource consuming SQL statements

Re: How do I get a list of most resource consuming SQL statements

From: Em Pradhan <empradhan_at_dplus.net>
Date: Tue, 13 Apr 1999 08:44:39 -0400
Message-ID: <37133C37.19ADA09F@dplus.net>


Hi
try this one

select rpad(substr(username,1,12),12,' '), substr(terminal,1,25), substr(s.machine,1,30),substr(name,1,22),value from v$statname n,
v$session s,
v$sesstat t
where s.sid=t.sid

and n.statistic# = t.statistic#
and s.type = 'USER'
and s.username is not NULL
and n.name = 'session pga memory'
and t.value > &try_more_than_50000

/

HTH Pradhan

Cor Kooij wrote:

> I'm looking for a way to find out which SQL-statements consumed the most
> resources in terms of CPU and/or memory, the last hours/day/week.
> A top 10 or whatever number of SQL-statements would enable me to focus
> on the worst cases first.
Received on Tue Apr 13 1999 - 07:44:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US