In Oracle, you can query the stored procedure execution record time through the following method: use the DBMS_PROFILER package to obtain execution statistics. Use the V$PROFILER view to get statistics on executing SQL statements and PL/SQL units. Use Oracle Monitor to view related events in the session event history. Use the AUDIT plug-in to audit stored procedure execution and obtain information in the audit file.
How to query the stored procedure execution record time in Oracle
In Oracle, you can query the storage through the following method Process execution record time:
1. Use the DBMS_PROFILER package
The DBMS_PROFILER package provides the function of viewing stored procedure execution statistics, including execution time. To use this package:
1 2 3 4 5 6 7 8 9 10 |
|
The results will be stored in the DBMS_PROFILER.RESULTS table, which you can query to get the execution time of the stored procedure:
1 2 3 |
|
2. Using V$ PROFILER view
The V$PROFILER view provides statistical information about SQL statements and PL/SQL units being executed in the current or most recently run session. To use this view:
1 2 3 |
|
3. Using Oracle Monitor
Oracle Monitor is a graphical user interface (GUI) that allows you to view Various statistics, including stored procedure execution time. To use Oracle Monitor:
4. Using the AUDIT plug-in
The AUDIT plug-in allows you to audit activity in your database, including the execution of stored procedures. To use the AUDIT plug-in:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
You can find information about the execution time of a stored procedure in the audit file.
The above is the detailed content of How to check the execution record time of stored procedure in Oracle query. For more information, please follow other related articles on the PHP Chinese website!