DBMS_PROFILER v18
The DBMS_PROFILER package collects and stores performance information about the PL/pgSQL and SPL statements that are executed during a performance profiling session. Use these functions and procedures to control the profiling tool.
| Function/procedure | Return type | Description |
|---|---|---|
FLUSH_DATA | Status Code or Exception | Flushes performance data collected in the current session without terminating the session. Profiling continues. |
GET_VERSION(major OUT, minor OUT) | n/a | Returns the version number of this package. |
INTERNAL_VERSION_CHECK | Status Code | Confirms that the current version of the profiler works with the current database. |
PAUSE_PROFILER | Status Code or Exception | Pauses data collection. |
RESUME_PROFILER | Status Code or Exception | Resumes data collection. |
START_PROFILER(run_comment, run_comment1 [, run_number OUT ]) | Status Code or Exception | Starts data collection. |
STOP_PROFILER | Status Code or Exception | Stops data collection and flushes performance data to the PLSQL_PROFILER_RAWDATA table. |
The functions in the DBMS_PROFILER package return a status code to indicate success or failure. The DBMS_PROFILER procedures raise an exception only if they encounter a failure. The table shows the status codes and messages returned by the functions and the exceptions raised by the procedures.
| Status code | Message | Exception | Description |
|---|---|---|---|
-1 | error version | version_mismatch | The profiler version and the database are incompatible. |
0 | success | n/a | The operation completed successfully. |
1 | error_param | profiler_error | The operation received an incorrect parameter. |
2 | error_io | profiler_error | The data flush operation failed. |
FLUSH_DATA
The FLUSH_DATA function/procedure flushes the data collected in the current session without terminating the profiler session. The data is flushed to the tables described in the EDB Postgres Advanced Server Performance Features Guide. The function and procedure signatures are:
<status> INTEGER FLUSH_DATA FLUSH_DATA
Parameters
status
Status code returned by the operation.
GET_VERSION
The GET_VERSION procedure returns the version of DBMS_PROFILER. The procedure signature is:
GET_VERSION(<major> OUT INTEGER, <minor> OUT INTEGER)
Parameters
major
The major version number of DBMS_PROFILER.
minor
The minor version number of DBMS_PROFILER.
INTERNAL_VERSION_CHECK
The INTERNAL_VERSION_CHECK function confirms that the current version of DBMS_PROFILER works with the current database. The function signature is:
<status> INTEGER INTERNAL_VERSION_CHECK
Parameters
status
Status code returned by the operation.
PAUSE_PROFILER
The PAUSE_PROFILER function/procedure pauses a profiling session. The function and procedure signatures are:
<status> INTEGER PAUSE_PROFILER PAUSE_PROFILER
Parameters
status
Status code returned by the operation.
RESUME_PROFILER
The RESUME_PROFILER function/procedure pauses a profiling session. The function and procedure signatures are: