Solved

Pl/sql package procedure reivew/tuning

Posted on 2013-05-30
4
471 Views
Last Modified: 2013-06-19
DB: Oracle 11gR2

Hi, need some assistance, how one can review/tune a 500 lines pl/sql package, have already tried DBMS_PROFILER, but not good, also able to tune each and every sql within the package too, all the sql looks good, but when executed within this 500 lines package, taking more time then expected.

Is there any way to review/tune this whole package, what exactly it is doing and where exactly is the bottleneck.

Looking for some hints/tips or even some guidelines should work too.

Thanks in advance.
0
Comment
Question by:mkhandba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39207594
Unfortunately the best way I've found is just adding some debug statements inside the procedure.  Either with dbms_output or at times I create a timing table and insert rows into it as my code runs.

My timing table looks like: create table test_timing(where_am_i varchar2(30), time_stamp systimestamp);

Then as the code executes I insert into it like:
insert into test_timing('Starting run',systimestamp);
commit;

As for tuning the SQL, this is the same way you tune any SQL:  Explain Plan and/or tkprof.
0
 

Author Comment

by:mkhandba
ID: 39207633
Hmmm ... means there is no way/technique to review the execution of a pl/sql package in a whole ... ?

Let's wait for some more ... let's see.
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 total points
ID: 39207666
0
 
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 250 total points
ID: 39208807
Hi,
If you have Diagnostic Pack you can get the most consuming parts from v$active_session_history
SQL_ID for sql statements (statement in V$SQL)
PLSQL_OBJECT_ID , PLSQL_SUBPROGRAM_ID for pl/sql functions (names in DBA_PROCEDURES)
Regards,
Franck.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question