Solved

The Oracle top ten slowest query

Posted on 2013-06-10
12
713 Views
Last Modified: 2013-08-01
DEAR all,

 in MS SQL server, we can find out the top 10 slowest query and then start to tune it one by one in order to make the slowest query faster.

  What is teh script for Oracle to find out:
1) top 10 slowest query.
2) Top 10 slowest store procedure.
3) top 10 most busy index?
0
Comment
Question by:marrowyung
[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
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39236101
Just run AWR report.
:p
0
 
LVL 29

Assisted Solution

by:MikeOM_DBA
MikeOM_DBA earned 100 total points
ID: 39236246
Or...check out if you can use one of these scripts.
0
 
LVL 49

Accepted Solution

by:
PortletPaul earned 200 total points
ID: 39236694
If licensed for it the Performance Pack has many tools for performance tuning.

If you aren't licensed for it use the statspack.

(Oracle  10g and later) AWR reports, see:
http://docs.oracle.com/cd/B19306_01/server.102/b14211/autostat.htm#PFGRF027

(to start a snashot for the AWR report you need:
with execute privilege on package dbms_workload_repository.
execute dbms_workload_repository.create_snapshot('TYPICAL');
parameter (default) is ‘TYPICAL’  - can be  ‘ALL’)

For earlier Oracle versions, or without performance pack, use statspack
http://docs.oracle.com/cd/B19306_01/server.102/b14211/autostat.htm#PFGRF027

Other potentially useful resources:
http://www.oraperf.com/ (Upload your utlbstat/utlestat or STATSPACK file and get the performance recommendations on your screen)

http://ondataperf.com/ (provides ORACLE database performance analysis using your STATSPACK or AWR METRICS that is generated from your database. All that is required are simple text files that are uploaded to the OnDataperf performance analysis engine.)

http://community.dbapool.com/dbanalyzer.php

Also: Don't forget that although some queries may be costly they might not be run frequently, so you also need to consider frequency of use.

{edit, added the following}
and: regarding the AWR you might find this helpful:
How to get the most relevant information from a Statspack or AWR report in just one hour. Focusing only on the details that can be tuned, and that can potentially improve the user response time.
http://prezi.com/glqm9zemzhup/interpreting-awr-report-straight-to-the-goal/
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 200 total points
ID: 39240224
Hi,

Another tool very nice that I discovered recently: http://orachrome.com/index.html (has a free trial).

@PortletPaul, very good links - especially the last one ;)

Regards,
Franck.
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 39240324
@FranckPachot - indeed it is, and I thank you for it ;)
0
 
LVL 1

Author Comment

by:marrowyung
ID: 39278382
let me check
0
 
LVL 1

Author Comment

by:marrowyung
ID: 39366192
"http://orachrome.com/downloading.html"

it seem this one can't run on Windows server? what if I install it from a server and connect to the oracle ?

can I install on the Oracle server itself ?
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 39366231
Is this a different question?
how does this relate to: "The Oracle top ten slowest query"
please open new questions for new topics
(and, close off finished questions)

Oracle (the dbms) is available for a range of Windows O/S platforms.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 39366367
I see this

"I discovered recently: http://orachrome.com/index.html (has a free trial). " here and I just ask in the same post.
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 39366523
>>and I just ask in the same post.
which is not how it should be done in my opinion :(

THIS question is about "The Oracle top ten slowest query"

is this question answered? (if so it should be closed)

Sorry, but if the topic changes - so should the the question.
Taken to the extreme there would be only one question that meanders indefinitely.
0
 
LVL 15

Expert Comment

by:Franck Pachot
ID: 39368089
>> it seem this one can't run on Windows server? what if I install it from a server and connect to the oracle ?
>> can I install on the Oracle server itself ?
It's just a java standalone application, you can intall it everywhere.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 39372894
franckpachot,

"It's just a java standalone application, you can intall it everywhere. "

nice.
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

726 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