I’m trying to run the following in Toad SQL Editor…it keeps squawking about the “col” command. Can you not format columns in SQL Editor, or am I just doing something incorrectly?
Thanks from a newbie.
RW
/set lines 155/
col execs for 999,999,999
col avg_etime for 999,999.999
col avg_lio for 999,999,999.9
col begin_interval_time for a30
col node for 99999
/break on plan_hash_value on startup_time skip 1/
select ss.snap_id, ss.instance_number node, begin_interval_time, s.sql_id, s.plan_hash_value,
nvl(executions_delta,0) execs,
(elapsed_time_delta/decode (nvl(executions_delta,0),0,1,executions_delta))/1000000 avg_etime,
(buffer_gets_delta/decode (nvl(buffer_gets_delta,0),0,1,executions_delta)) avg_lio, s.sql_profile, sq.sql_text
from DBA_HIST_SQLSTAT S, DBA_HIST_SNAPSHOT SS, v$sql SQ
where s.sql_id = sq.sql_id and
ss.snap_id = S.snap_id
and ss.instance_number = S.instance_number
and executions_delta > 0
–and begin_interval_time > ‘12/06/2017 0:00:00.000 AM’
order by 1, 2, 3
/