SQL*Plus User's Guide and Reference

Contents Index Home Previous Next

TIMING

Purpose

Records timing data for an elapsed period of time, lists the current timer's name and timing data, or lists the number of active timers.

Syntax

TIMI[NG] [START text|SHOW|STOP]

Terms and Clauses

Refer to the following list for a description of each term or clause:

START text Sets up a timer and makes text the name of the timer. You can have more than one active timer by STARTing additional timers before STOPping the first; SQL*Plus nests each new timer within the preceding one. The timer most recently STARTed becomes the current timer.
SHOW Lists the current timer's name and timing data.
STOP Lists the current timer's name and timing data, then deletes the timer. If any other timers are active, the next most recently STARTed timer becomes the current timer.
Enter TIMING with no clauses to list the number of active timers.

Usage Notes

You can use this data to do a performance analysis on any commands or blocks run during the period.

For information about the data TIMING displays, see the Oracle installation and user's manual(s) provided for your operating system. Refer to SET TIMING ON for information on automatically displaying timing data after each SQL command or PL/SQL block you run.

To delete all timers, use the CLEAR TIMING command.

Examples

To create a timer named SQL_TIMER, enter

SQL> TIMING START SQL_TIMER

To list the current timer's title and accumulated time, enter

SQL> TIMING SHOW

To list the current timer's title and accumulated time and to remove the timer, enter

SQL> TIMING STOP


Contents Index Home Previous Next