Collections:
Show Execution Statistics Reports in Oracle
How To Get Execution Statistics Reports on Query Statements in Oracle?
✍: FYIcenter.com
If your user account has autotrace configured by the DBA, you can use the "SET AUTOTRACE ON STATISTICS" command to turn on execution statistics reports on query statements. The tutorial exercise bellow shows you a good example:
SQL> CONNECT HR/retneciyf
SQL> SET AUTOTRACE ON STATISTICS
SQL> SELECT E.LAST_NAME, E.SALARY, J.JOB_TITLE
2 FROM EMPLOYEES E, JOBS J
3 WHERE E.JOB_ID=J.JOB_ID AND E.SALARY>12000;
LAST_NAME SALARY JOB_TITLE
----------------- ---------- -----------------------------
King 24000 President
Kochhar 17000 Administration Vice President
De Haan 17000 Administration Vice President
Russell 14000 Sales Manager
Partners 13500 Sales Manager
Hartstein 13000 Marketing Manager
6 rows selected.
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
16 consistent gets
0 physical reads
0 redo size
720 bytes sent via SQL*Net to client
384 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
6 rows processed
⇒ Understanding SQL Language Basics for Oracle
⇐ Show Execution Path Reports in Oracle
2020-05-29, 2491🔥, 0💬
Popular Posts:
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
How To Convert Characters to Numbers in Oracle? You can convert characters to numbers by using the T...
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...