Dba Best Practices Ow08 129450 PDF
Dba Best Practices Ow08 129450 PDF
1. Performance Diagnosis
2. SQL Optimization
3. Space Management
1. Performance Diagnosis
2. SQL Optimization
3. Space Management
Performance Diagnostics
SQL Optimization
Space Management
Q&A
Performance Diagnostics
Key Concepts
Automatic System Diagnostics
Manual System Diagnostics
Advanced Topics
Targeted analysis
Comparative analysis
Key Concepts
DB Time
DB Time
Wall-Clock (Elapsed) Time
Automatic Diagnostic
Engine
Self-Diagnostic
Engine inside
DB
High-load
SQL
SQL
Advisor
IO / CPU
issues
System
Resource
Advice
RAC issues
Network +
DB config
Advice
#1
P
B
0
Click!
P
B
9
Performance
Range
*
Time
ASH Report:
Top Events for that SQL
ASH Report:
Activity for that SQL over the same 5 mins
Performance
P
B
8
Actual
Baseline
time
Performance Diagnostics
SQL Optimization
Space Management
Q&A
SQL Optimization
P
B
7
Demo
Real-time SQL Monitoring
P
B
6
SQL Tuning
Advisor
Comprehensive Analysis
Recommendation
Statistics Analysis
Gather Missing or
Stale Statistics
Access Structure
Analysis (Single
SQL)
Add Missing
Indexes (B* Tree)
SQL Design
Analysis
Modify SQL
Constructs
Create a SQL
Profile
SQL
Live tuning
Run SQL Tuning Advisor in Limited mode only if system does not have spare
resources otherwise run in Comprehensive mode (recommended)
Remote tuning
Tuning remotely if
Cumulative resources/time consumed by all SQL statements significant
System cannot spare resources
Use SQL Profile and SQL Tuning Set export/import capabilities
Packaged
Apps
Custom
Apps
Auto Capture
High-Load SQL
Nightly
Automatic
implement
SQL
Analysis
Report
Manually
implement
Well-tuned SQL
P
B
5
2.
3.
4.
5.
P
B
4
Pre-change
executions
stats
Compare SQL
Performance
Analysis Report
Post-change
executions
stats
Database Replay
Capture From
Test Changes In
9i R2
10g R2 or 11g
10g R1
10g R2 or 11g
10g R2
10g R2 or 11g
9i R2
11g
10g R2
11g
Performance Diagnostics
SQL Optimization
Space Management
Q&A
Space Management
Goals
Optimize space usage by eliminating/ minimizing
fragmentation
Optimize data access and transaction performance
Performance
Serialization of space management
at file level
Space management faster by 100200%
Superior performance
P
B
3
Response Time
ASSM
MSSM
3
2
1
0
1
16
32
Concurrent Users
8
Response Time
ASSM
MSSM
6
4
2
0
1
Concurrent Users
Internal Fragmentation
Shrink
Online Redef
Alter MOVE
Online
In-place
Incremental
Dependecy
Maintenance
Parallel
P
B
2
64K or multiple:
Global temporary tables are predominant and amount of data loaded is small
Application is predominantly OLTP
V$TEMPSEG_USAGE
SESSION_NUM USERNAME
SEGTYPE BLOCKS TABLESPACE
----------- -------- --------- ------ ---------101
SCOTT
SORT
128
TEMP
102
SCOTT
LOB_DATA
128
TEMP
103
SYS
HASH
256
TEMP
Location
Moscone West
Exhibit Hall
Moscone West
Exhibit Hall
Moscone West
Exhibit Hall
Moscone West
Exhibit Hall
Moscone West
Exhibit Hall
Moscone West
Exhibit Hall
Moscone West
Exhibit Hall
Recommended Sessions
Session Title
Date
Time
Monday, 9/22
2:30
Monday, 9/22
4:00
Tuesday, 9/23
11:30
Tuesday, 9/23
1:00
Tuesday, 9/23
5:00
Wed, 9/24
9:00
Wed, 9/24
11:30
Wed, 9/24
1:00
Thursday, 9/25
1:30
Location