Solved

SQL performance tuning

Posted on 2013-01-10
3
523 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
[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
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 77

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

691 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