Oracle Profiling Tools Dbms_profiler Parsing code

Source: Internet
Author: User

Tag:pac    Analysis    art   file   home    sysdate   tar   str   rdbms   

You need to run $oracle_home/rdbms/admin/proftab.sql  to create some key tables before executing. Begindbms_profiler. Start_profiler (' My_application ' | | To_char (sysdate, ' yyyymmdd hh24:mi:ss '));--execution procedure My_application_code;dbms_profiler. End_profiler; END; Select to_char (p1.total_time/10000000, ' 99999999 ')        | | ' -'        | | To_char (p1.total_occur)  as time_count,         substr   (p2.unit_owner,1,20)          | | '. '          | | DECODE (P2.unit_name, ', ' <anonymous> ', SUBSTR (p2.unit_name,1,20))           as unit,         to_char (p1.line#) | |   '-' | | p3.text text  from plsql_profiler_data p1       , Plsql_profiler_units p2       ,all_source p3       , (Select sum (total_time)  AS  grand_total from plsql_profiler_units)  p4 where p2.unit_owner not in (' SYS ', ' SYSTEM ')    and p1. runid=3   and  (P1. total_time >=p4.grand_total/100)    and p1. Runid=p2. Runid   and p2. Unit_number=p1. Unit_number   and p3. Type= ' Package body '    and p3. Owner=p2. unit_owner   and p3.line=p1.line#   and p3.name=p2.unit_name    ORDER BY p1.total_time DESC;


Oracle Profiling Tools Dbms_profiler Parsing code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.