Solved

The Oracle top ten slowest query

Posted on 2013-06-10
12
692 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
  • 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
 
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
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.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

912 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

15 Experts available now in Live!

Get 1:1 Help Now