Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL statement execution time

SOLVED
Go to solution
Vincenzo Restuccia
Honored Contributor

SQL statement execution time

Is it possible to measure the execution time of a SQL statement from a client to a server, from inside an open SQL session? If yes, HOW?
Thanks in advance
1 REPLY
Volker Borowski
Honored Contributor
Solution

Re: SQL statement execution time

Hi,
if database ist Oracle you have options in sqlplus:

SQL> set timing on;
SQL> select count(*) from table;

COUNT(*)
----------
157

Elapsed: 00:00:00.01
SQL>

And svrmgrl:
SVRMGR> set timing on;
Timing ON
SVRMGR> select count(*) from dba_segments;
COUNT(*)
----------
1090
1 row selected.
Parse 0,06 (Elapsed) 0,00 (CPU)
Execute/Fetch 0,31 (Elapsed) 0,00 (CPU)
Total 0,37 0,00
SVRMGR>

Which is a little bit more detailed.

Hope this helps.
Volker