Identify bottlenecks in queries [message #637764] |
Sun, 24 May 2015 02:44 |
|
shumail
Messages: 149 Registered: September 2012 Location: Canada
|
Senior Member |
|
|
Hi All
I did my recent interview few days back and they asked me one of the question and I'm, curious to know the answer for my learning purpose.
Question
You have a package name abc and this package contained 10 procedures.
You execute that package and it freeze or stuck in the middle.
Tell me how do you know that your package stuck on which procedure or on which select statement...
I really appreciate if someone answer this question for my learning purpose.
Regards
Shu
|
|
|
|
|
Re: Identify bottlenecks in queries [message #637767 is a reply to message #637766] |
Sun, 24 May 2015 02:54 |
John Watson
Messages: 8919 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
shumail wrote on Sun, 24 May 2015 08:49I think execute package means running the package. please let me know if you find me wrong... What does "running the package" mean? If you think that it actually means anything, you are showing that you have no knowledge of PL/SQL. Which may be why they asked such a question. How would you invoke something written in PL/SQL?
|
|
|
|
|
Re: Identify bottlenecks in queries [message #637770 is a reply to message #637769] |
Sun, 24 May 2015 04:20 |
John Watson
Messages: 8919 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
OK. So go back your original question:
Quote:Tell me how do you know that your package stuck on which procedure or on which select statement...
I think you can re-word it now so that it makes sense. THen you need to look at what tools are available. Try researching dbms_profiler, dbms_hprof, and dbms_monitor. Also statspack and dbms_workload_repository.
update: Also v$session_longops and v$session_wait.
[Updated on: Sun, 24 May 2015 04:22] Report message to a moderator
|
|
|
|
|
|
|
|
|
|