Site icon IT Tutorial

Oracle Database Wait Event Scripts -2

Hi,

When you take many complaints from customer about slowness of database, you should check Oracle database wait events.

 

 

If you don’t know What are the Wait Events in the Oracle Database and their solution, you can read the following article.

Oracle Wait Events and Their Solutions in Oracle Database

 

 

You can check Top Oracle database wait events at specific intervals.

You should type date and SNAP_ID

select snap_id,begin_interval_time,end_interval_time
from dba_hist_snapshot
where to_char(begin_interval_time,'DD-MON-YYYY')='20-FEB-2019'
and EXTRACT(HOUR FROM begin_interval_time) between 8 and 10;

select * from (
select active_session_history.event,
sum(active_session_history.wait_time +
active_session_history.time_waited) ttl_wait_time
from dba_hist_active_sess_history active_session_history
where event is not null
and SNAP_ID between 34411 and 34431
group by active_session_history.event
order by 2 desc)
where rownum<10;

 

Query result should be such as follows.

 

 

 

Do you want to learn Oracle Database Performance Tuning detailed, then read the following articles.

https://ittutorial.org/oracle-database-performance-tuning-tutorial-12-what-is-the-automatic-sql-tuning-and-how-to-automated-sql-tuning/ 

Exit mobile version