Solved

The Oracle top ten slowest query

Posted on 2013-06-10
12
709 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 48

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 48

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 48

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 48

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SYS password changed. Now can't log in as SYS 27 60
oracle differnce between two timestamps 5 51
Read XML values 8 67
Oracle Date 6 39
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

737 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