Diagnosing a performance issue
We had a performance problem where the application took 8 seconds instead of less than 1 seconds. I ran the command and the output is below. My question is why the explain plan says UPDATE took 1 second whereas the query against dba_hist_active_sess_history tells that update statement was the costliest in terms of time taken?
1 select sql_id,count(*),event,sum(time_waited) from dba_hist_active_sess_history
2 where sample_time between to_timestamp('01-JUL-14 09:19:00 AM') and to_timestamp('01-JUL-14 09:21:00 AM')
3 group by sql_id, event
4* order by 4 desc
DBA_USER prod_dcop >/
SQL_ID COUNT(*) EVENT SUM(TIME_WAITED)