web analytics

how to time an select query in Oracle?

Options

codeling 1602 - 6666
@2017-06-23 10:19:23

In SQL*Plus you can also use the simple TIMING option:

SQL> SET TIMING ON
SQL> SELECT bla FROM bla...
...
Elapsed: 00:00:00:01
SQL> SELECT bar FROM foo...
...
Elapsed: 00:00:23:41
SQL> SET TIMING OFF

This will report timing information for each statement individually.

Another option is to set up individual timers:

SQL> TIMING START mytimer
SQL> ... run all my scripts ...
SQL> TIMING STOP
timinig for: mytimer
Elapsed: 00:00:08.32

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com