Solved

SQL performance tuning

Posted on 2013-01-10
3
513 Views
Last Modified: 2013-01-10
What are the key steps to address the slow running SQL query in Oracle 11gr2.
Where to begin with , what should be the typical steps to find the root cause?
0
Comment
Question by:taaz
3 Comments
 
LVL 22

Accepted Solution

by:
Steve Wales earned 500 total points
ID: 38764148
One of the first things you could look at is the execution plan

See the Oracle Documentation for how to gather that information:

http://docs.oracle.com/cd/E11882_01/server.112/e16638/ex_plan.htm

Then there's some other reference sites:

http://www.oracle-base.com/articles/8i/explain-plan-usage.php
http://www.adp-gmbh.ch/ora/explainplan.html

For formatting the output in a nice, understandable way, there's DBMS_XPLAN

http://docs.oracle.com/cd/E11882_01/server.112/e16638/ex_plan.htm
http://www.oracle-base.com/articles/9i/dbms_xplan.php

Gathering your plan data is the first step.

Interpreting the data that you get is a whole other animal, but start with the above.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38764150
First make sure your statistics are up to date and generate an explain plan.

Look for obvious things like full table scans that you don't think should be there.

If this is a large query with a lot of sub selects, generate explain plans for them individually (break it down into smaller pieces).

If none of that helps, you can trace the session and use tkprof to look at the execution in much greater detail.

Then you can look at the possibility of things like hot blocks in the tablespace.  Possibly look at ways to redesign things.  Possible move some tables to a different tablespace with a different block size, move them to different disks, etc...
0
 

Author Closing Comment

by:taaz
ID: 38764318
Thanks for the quick reply.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now