Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

The Oracle top ten slowest query

Posted on 2013-06-10
12
Medium Priority
?
726 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 300 total points
ID: 39236246
Or...check out if you can use one of these scripts.
0
 
LVL 49

Accepted Solution

by:
PortletPaul earned 600 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 600 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

647 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