Solved

SQL performance tuning

Posted on 2013-01-10
3
515 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PL/SQL Multiple PAYER_IDs with PAYER_TYPES are these types 3 39
Oracle Subquery bad Join 11 59
help on oracle query 5 33
selective queries 7 22
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…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
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.

895 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

12 Experts available now in Live!

Get 1:1 Help Now