ORACLE performance optimization - DBMS_HPROF

This tool is somewhat similar to DBMS_PROFILER, but it is too fine-grained than DBMS_PROFILER. There is no hierarchy and no summary, while DBMS_PROFILER can provide layer-by-layer summary information similar to the organization tree.

Steps for usage

  1. First create an external directory PLSHPROF_DIR (create or replace directory PLSHPROF_DIR as '/tmp'; )
  2. Assign read and write permissions to the directory to the specified database user (GRANT WRITE, READ ON DIRECTORY PLSHPROF_DIRTO apps;)
  3. Grant sys.dbms_hprof execution permission to the specified database user (grant execute on dbms_hprof to apps;)
  4. Execute the script @?/rdbms/admin/dbmshptab.sql to initialize the environment
  5. Open a session and execute dbms_hprof.start_profiling(location => 'PLSHPROF_DIR', filename => 'pwdbb
    w.trc');
  6. In the same session, execute related stored procedures
  7. End: dbms_hprof.stop_profiling;
  8. Execute in the ORACLE_BIN directory: plshprof -output hprof pwdbbw.trc
  9. Where hprof is the name of the generated output html file, and pwdbbw.trc is the source tracking file
  10. View the generated html report

Guess you like

Origin blog.csdn.net/x6_9x/article/details/118002002