Más contenido relacionado
La actualidad más candente (20)
Similar a Oracle Performance Tools of the Trade (20)
Oracle Performance Tools of the Trade
- 2. Carlos
Sierra
• SQLTXPLAIN
+
SQL
Health-‐Check
SQLHC
+
• Consultant/Developer/DBA/Design/+
• Oracle
Performance
+
SQL
Tuning
• Oracle
Database
Health-‐Check
• Tools
+
Scripts
• Speaker
Enkitec
©
2014
2
- 3. Tools
of
the
Trade
• OEM
• AWR
• ADDM
• ASH
• Snapper
• EDB360
Enkitec
©
2014
3
- 4. OEM
• Oracle
Enterprise
Manager
(OEM)
– Database
Control
– Grid
Control
• GUI
Tool
for
System
Monitoring
– Including
Performance
Enkitec
©
2014
4
- 22. AWR
• Automa[c
Workload
Repository
(AWR)
• Requires
Oracle
Diagnos[cs
Pack
License
• Set
of
DBA_HIST
views
• Periodic
Snapshots
(1hr
apart
by
default)
• 7
days
history
(by
default)
Enkitec
©
2014
22
- 23. AWR
Demo
• Exadata
with
happy
Users
(no
complains)
• Which
bo_lenecks
you
see?
• What
is
your
hypothesis?
• What
would
be
your
ac[on
plan?
Enkitec
©
2014
23
- 38. AWR
Demo
Conclusions
(1)
• High
Parsing
– Use
of
Literals
instead
of
Bind
Variables
• Some
subop[mal
SQL
was[ng
CPU
cycles
• High
Background
Waits
related
to
DBWR
• Write
Back
Flash
Cache
disabled
– Hard
to
spot!
Enkitec
©
2014
38
- 39. AWR
Demo
Conclusions
(2)
• 6
copies
of
Control
Files
– 2
members
in
2
high
redundancy
disk
groups
• Thousands
of
Tablespaces
(thus
Data
Files)
• Frequent
Log
switches
due
to
small
size
– Think
Checkpoints
upda[ng
SCN
on
Data
Files
and
Control
Files
Enkitec
©
2014
39
- 40. AWR
Demo
Conclusions
(3)
• There
is
usually
more
than
1
culprit
– Even
when
performance
is
fine
• Database
health-‐check
is
like
any
other
– Early
detec[on
is
preferred
• Mo_o:
“if
it
ain't
broke,
don't
fix
it”
– Really?
– Would
you
apply
this
mo_o
to
your
own
health?
Enkitec
©
2014
40
- 41. Alert
Log
• As
old
as
Oracle
• Your
friend
• Like
reading
your
Daily
News
• Watch
for
ORA
errors
– And
fix
them!
• Rename
every
so
olen
Enkitec
©
2014
41
- 42. ADDM
(1)
• Automa[c
Database
Diagnos[c
Monitor
• Requires
Oracle
Diagnos[cs
Pack
License
• Its
goal
is
to
reduce
DB
Time
– Wait
and
CPU
[me
of
all
non-‐idle
user
sessions
• Based
on
AWR
data
– Hourly
execu[on
by
default
Enkitec
©
2014
42
- 43. ADDM
(2)
• Database,
Instance
or
Par[al
modes
• Available
via
OEM
or
SQL*Plus
– DBA_ADVISOR_*
– DBA_ADDM_*
• Be
cau[ous
with
“Advice”
Enkitec
©
2014
43
- 44. ASH
(1)
• Ac[ve
Session
History
(ASH)
• Requires
Oracle
Diagnos[cs
Pack
License
• Ac[ve
Session
– On
CPU;
or
– Non-‐idle
Wait
Enkitec
©
2014
44
- 45. ASH
(2)
• Snapshot
of
V$SESSION
every
second
– V$ACTIVE_SESSION_HISTORY
– Every
10
seconds
on
AWR
• DBA_HIST_ACTIVE_SESS_HISTORY
• Source
of
truth
• Mul[-‐dimension
Enkitec
©
2014
45
- 47. Snapper
• Free
download
and
use
Script
• Installs
nothing
• Does
NOT
requires
Oracle
Diagnos[cs
Pack
•
Session
centric
– snapper.sql
all
seconds_in_snap
snap_count
sid
– @snapper.sql
all
30
1
2617
Enkitec
©
2014
47
- 50. EDB360
Enkitec
©
2014
50
• Free
download
and
use
Tool
• Installs
nothing
• 360-‐degree
view
of
an
Oracle
database
• Designed
to
ease
a
database
health-‐check
• Pack
License?
Days?
HTML?
Txt?
CSV?
Chart?
• @edb360.sql
T
31
Y
Y
Y
Y
- 51. EDB360
Demo
• 11.2.0.3
on
a
barely
used
Exadata
system
• What
do
you
see?
Enkitec
©
2014
51
- 57. EDB360
Demo
Conclusions
• Configura[on
• Administra[on
• Time
Model
• Wait
Events
• AWR
+
ADDM
+
ASH
Reports
• Top
SQL
Enkitec
©
2014
57
- 58. References
• Oracle
Database
Performance
Tuning
Guide
11g
Release
2
• Snapper
-‐
Tanel
Poder
– h_p://blog.tanelpoder.com/files/scripts/
snapper4.sql
• h_p://www.enkitec.com/products/edb360
Enkitec
©
2014
58
- 59. Contact
Informa[on
• carlos.sierra@enkitec.com
• carlos-‐sierra.net
• @csierra_usa
Enkitec
©
2014
59