Basic Oracle Concepts and Programming Question:

How To Use SQL*Plus Built-in Timers?

Tweet Share WhatsApp

Answer:

If you don't have a stopwatch/timer and want to measure elapsed periods of time, you can SQL*Plus Built-in Timers with the following commands:

* TIMING - Displays number of timers.
* TIMING START [name] - Starts a new timer with or without a name.
* TIMING SHOW [name] - Shows the current time of the named or not-named timer.
* TIMING STOP [name] - Stops the named or not-named timer.

The following tutorial exercise shows you a good example of using SQL*Plus built-in timers:

SQL> TIMING START timer_1

(some seconds later)
SQL> TIMING START timer_2

(some seconds later)
SQL> TIMING START timer_3

(some seconds later)
SQL> TIMING SHOW timer_1
timing for: timer_2
Elapsed: 00:00:19.43

(some seconds later)
SQL> TIMING STOP timer_2
timing for: timer_2
Elapsed: 00:00:36.32

SQL> TIMING
2 timing elements in use

Download Oracle Database PDF Read All 430 Oracle Database Questions
Previous QuestionNext Question
How Run SQL*Plus Commands That Are Stored in a Local File?What Is Oracle Server Autotrace in Oracle?