Skip to content
WaitScope Sign in Request access (by email) Menu

Wait classes and recursive SQL

The profile grouped by Oracle wait class and the time of recursive SQL, which a statement triggers in functions, triggers and the dictionary.

Applies to: 10046 traces

Two views complete the profile: the same time grouped by Oracle wait class, which shows what kind of wait it is, and the time of recursive SQL, which shows how much a statement spends in the statements it triggers.

What the section shows

Right below the profile, the By wait class table adds up the components by Oracle class (wait_class), with CPU and unaccounted-for time as classes of their own. The rows also add up to the total time. The class of each event follows v$event_name in Oracle 19c; the gc events go under Cluster, and an event WaitScope cannot classify goes under Unclassified.

The profile classes
ClassWhat it groups
IdleThe session waiting for work. In a session trace, it is almost always SQL*Net message from client: application, network and user time.
NetworkData sent and received over SQL*Net, with the application or with another database over a dblink.
User I/OData reads and writes done by the session itself.
System I/OI/O by background processes that the session waited for.
CommitThe redo write at COMMIT (log file sync).
ApplicationA row or table held by another session, locks taken by the application itself, errors returned.
ConcurrencyContention on internal structures: latches, mutexes, buffers.
ConfigurationA configuration limit: redo log, buffer cache, ITL, sequence cache, space.
SchedulerResource Manager holding the session back.
ClusterBlocks and messages exchanged between RAC instances.
Administrative and OtherAdministrative commands and internal events with no more specific class.
CPU and Unaccounted-forThe CPU components and the two unaccounted-for times of the profile.
UnclassifiedEvents WaitScope cannot classify.

How to read it

Columns of the By wait class table
ColumnWhat it says
ClassThe class name. Click it to open the card, with Normal when, A concern when and Where to look, as in the profile.
Duration (s)The sum of the components of the class.
% of totalThe share of total time, with the bar next to it.
OccurrencesThe sum of the occurrences of the components. Blank for Unaccounted-for.
Top componentsThe components that weigh most in the class, in profile order.

For an event under Unclassified, its class in the database is in v$event_name:

select name, wait_class
  from v$event_name
 where name = 'event name';

Recursive SQL

Recursive SQL is a statement that another statement runs, not the application: the SQL inside PL/SQL functions and procedures, the SQL in triggers and the queries the database itself runs against the dictionary. In the trace, it has dep= greater than 0. The report shows this time in four places:

  • In SQL statements, the Depth column is 0 for a statement called by the application and 1 or more for a recursive one. A recursive statement almost always has zero contribution: its time is already in the level-0 call that triggered it. Its own time is in Inclusive (s).
  • In the statement detail, the Depth card says called by the application or Recursive SQL.
  • In the Statement profile, the Recursive SQL (child statements) row, of type recursive, adds up the duration of the calls the statement triggered. Its card says it is normal in a PL/SQL statement that runs other SQL and that it is a concern when it adds up to a lot in a simple SELECT or DML: a PL/SQL function called per row, or a heavy trigger.
  • At the end of the detail, Recursive SQL executed by this statement lists the child statements that took the longest, from longest to shortest, with a link to the detail of each one.

In Statements by component, the time of each component goes to the statement that spent it: a read done by recursive SQL counts in the child statement, not in the one that triggered it.

When it is a concern

When these classes weigh on the total time, the Diagnosis shows a finding of its own, with medium severity, with the View profile by class link. Those for Application, Concurrency and Commit go up to high when the class weighs a lot.

In recursive SQL, the concern is a high Recursive SQL (child statements) row in a simple statement, and a recursive statement executed thousands of times with one row per execution: that is a loop in PL/SQL (row by row in PL/SQL).

Where to go next

Updated on 2026-10-29. Report an error on this page