-- cwt.sql: what an application's sessions are waiting on, by client_info -- Copyright (c) HASHJOIN. MIT License (https://hashjoin.com/kb/license/) -- https://hashjoin.com/kb/oracle/drill-into-one-session/ -- -- Usage: @cwt.sql set lines 132 set pages 1000 set trims on col CLIENT_IDENTIFIER format a20 col ACTION format a17 col P1TEXT format a14 col EVENT format a30 select inst_id,event,p1raw,max(seconds_in_Wait) max_wait,trunc(avg(seconds_in_Wait)) avg_wait,count(*),state from gv$session where client_info='&&1' and wait_time=0 group by inst_id,event,p1raw,state order by inst_id,event;