Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I get a list of most resource consuming SQL statements
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