Question:
How do I find slow SQL statements in my
Oracle database?
Answer: Oracle
provides several views to find SQL with a long execution time:
- v$active_session_history: The
sysdate-sql_exec_start will find slow SQL statements
- v$sql: The elapsed_time
column shows slow execution time for current SQL statements
- stats$sqlstat: This shows slow SQL
if you install
STATSPACK
- dba_hist_sqlstat : If you have
purchased the required extra cost packs, this table will collect
data on slow SQL statements over time.
Also see my notes on
finding slow
SQL statements and scripts to find SQL with a
slow
execution time.
For pre-tested scripts to find slow SQL
statements, get the
Oracle script
collection.
|
|
|
|
Guarantee your Success!
Oracle is the
world's most complex, robust and flexible database, considered
impossible to master without a mentor.
That's why all BC
Oracle trainers are working professionals, experts in Oracle who
share their tips and secrets. |
|
| |
|
Burleson is the American Team

Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright ? 1996 - 2012
All rights reserved.
Oracle ?
is the registered trademark of Oracle Corporation.
|
|