Nov 2, 2005

Online Sql Trace

When you have long running processes (like payroll PUYGEN), you do not need a sql trace file to find the top sql consumers.

Some sql statements can give you the same result.

select module, sql_hash_value, s.*
from v$session s
where module = 'PUYGEN'
order by 1, 2

select sql_text, s.executions, buffer_gets, s.*
from v$sql s
where hash_value =

select *
from v$sql_plan
where hash_value =
order by id

But this set of statements will not give you the waits.