An event can be defined as a particular function, or a task, that the Oracle kernel performs on behalf of the user session or its own background process. Tasks such as reading and writing data blocks to and from data files, waiting for latch acquisitions before accessing or manipulating data in the memory, inter-process postings and communications, are known as database events, and they have specific names.

Why are these events called Wait Events? All sessions accessing Oracle database instance need resources to perform their tasks. A resource may be a data buffer, a latch, an enqueue (lock), a pin, or a database object. Whenever a session has to wait for something, the wait time is tracked and charged to the event that is associated with that wait. For example, a session that needs an index block that is not in the SGA makes a read call to the operating system and waits for the delivery of the block. The wait time is charged to the db file sequential read event. Another session may have completed the last instruction and is now idle waiting for user input. In this case, the wait time is charged to the SQL*Net message from client event. When a session is not using the CPU, it may be waiting for a resource, an action to complete or simply for more work. For this reason events that are associated with all waits are known as Wait Events.

Wait Interface Components

Oracle Wait Interface is a collection of a few dynamic performance views and an extended SQL trace file. It provides statistics for wait events to tell how many times and how long, the session waited for an event to complete. But to get the 'how long' part, the initialization parameter, TIMED_STATISTICS, must be set to TRUE. Old documentation associated high overhead with this parameter. But currently, setting this parameter to TRUE does not add any appreciable overhead to the database performance on most platforms since most machines provide hardware support for fast timers. It provides invaluable timing information, without which Oracle Wait Interface is of very little use.

The following SQL statement will display all the events in an oracle instance.

SELECT *
FROM V$EVENT_NAME;

Since its introduction in Oracle 7.0.12, Oracle Wait Interface had four V$ views:

In addition to the above wait event views, Oracle10g introduced several new views to show wait information from several perspectives. Some of these views are:

 

Start the discussion at forums.toadworld.com