Anatomy of PL/SQL code using PL/SQL Developer Overview diagram

Source: Internet
Author: User

The key to performance optimization is to find the right direction, for example, for a PL/SQL code, we think it is slow to execute, but in the end it needs a measurable tool to analyze, and we sometimes like to leave debug code in it, like using dbms_utility.get_ Time is spent on the execution of the statement, which can be cumbersome if the code is large.

PL/SQL Developer provides this functionality, as described here

PL/SQL Developer Overview charts can be done for each line of code that has been run, the total time, the maximum time, the shortest time, the average time, and the number of runs will be counted. You can easily access the overview diagram in the Test window. Just press the Create overview report button in the Test window toolbar before you run the test script. If you then run the script, you can go to the Overview Chart tab to view the report.

Here is an example.

I'm going to measure my proc_test stored procedure.

The test window is as follows

2. Click the Overview Map button

If this is the first time, you will be prompted to create the base table used by the overview chart analysis

In fact, in the database created two Zhang Kiju, respectively, to create a plsql_profiler_data,plsql_profiler_runnumber, the point is to confirm.

Execute our program and look at the results after completion.

This is the most time to see Update target_tab, followed by select COUNT (*).

In this way, you can locate the most time-consuming operation in the program and spend it there, and we'll drill down and get the most out of tuning there.

Anatomy of PL/SQL code using PL/SQL Developer Overview diagram

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.