Upload
makokhan
View
229
Download
0
Embed Size (px)
Citation preview
8/14/2019 Less13 Performance TB3
1/28
13Copyright 2005, Oracle. All rights reserved.
Performance Management
8/14/2019 Less13 Performance TB3
2/28
13-2 Copyright 2005, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to dothe following: Use Enterprise Manager to monitor performance
Tune SQL by using the SQL Tuning Advisor Tune SQL by using the SQL Access Advisor Use Automatic Shared Memory Management
(ASSM)
Use the Memory Advisor to size memory buffers View performance-related dynamic views Troubleshoot invalid and unusable objects
8/14/2019 Less13 Performance TB3
3/28
13-3 Copyright 2005, Oracle. All rights reserved.
Performance Monitoring
Memoryallocation
issues
Input/output
devicecontention
Applicationcode
problems
Resourcecontention
Networkbottlenecks
?
DBA
> Perf MonTuning AdvAccess AdvMemoryStats
Invalid Obj
8/14/2019 Less13 Performance TB3
4/28
13-4 Copyright 2005, Oracle. All rights reserved.
Performance Monitoring
8/14/2019 Less13 Performance TB3
5/28
13-5 Copyright 2005, Oracle. All rights reserved.
Performance Monitoring
8/14/2019 Less13 Performance TB3
6/28
8/14/2019 Less13 Performance TB3
7/2813-7 Copyright 2005, Oracle. All rights reserved.
Performance Monitoring: Top Sessions
8/14/2019 Less13 Performance TB3
8/2813-8 Copyright 2005, Oracle. All rights reserved.
Performance Monitoring: Top Services
8/14/2019 Less13 Performance TB3
9/2813-9 Copyright 2005, Oracle. All rights reserved.
SQL Tuning Advisor: Overview
Add missing index
Run access advisor
Restructure SQL
Tune SQL plan(SQL profile)
Automatic Tuning Optimizer
SQL analysisoptimization mode
Access analysisoptimization mode
Plan tuningoptimization mode
Statistics checkoptimization mode Detect stale or missing
statistics
Comprehensive SQL tuning
SQL TuningAdvisor
Perf Mon> Tuning Adv
Access AdvMemoryStats
Invalid Obj
8/14/2019 Less13 Performance TB3
10/28
8/14/2019 Less13 Performance TB3
11/2813-11 Copyright 2005, Oracle. All rights reserved.
Using the SQL Tuning Advisor
Use the SQL Tuning Advisor to analyze SQLstatements and obtain performancerecommendations.
Sources for SQL Tuning Advisor to analyze Top SQL: Analyzes the top SQL statements
currently active SQL Tuning Sets: Analyzes a set of SQL statements
you provide
Snapshots: Analyzes a snapshot Baselines: Analyzes a baseline
8/14/2019 Less13 Performance TB3
12/2813-12 Copyright 2005, Oracle. All rights reserved.
Using the SQL Tuning Advisor: Example
8/14/2019 Less13 Performance TB3
13/28
8/14/2019 Less13 Performance TB3
14/2813-14 Copyright 2005, Oracle. All rights reserved.
SQL Tuning Advisor:Identifying Duplicate SQL
Bind variablecandidates
8/14/2019 Less13 Performance TB3
15/2813-15 Copyright 2005, Oracle. All rights reserved.
Using the SQL Access Advisor Perf MonTuning Adv
> Access AdvMemoryStats
Invalid Obj
8/14/2019 Less13 Performance TB3
16/2813-16 Copyright 2005, Oracle. All rights reserved.
Full Notes Page
8/14/2019 Less13 Performance TB3
17/2813-17 Copyright 2005, Oracle. All rights reserved.
Managing MemoryComponents
Automatic Shared Memory Management: Is recommended to simplify management Enables you to specify the total SGA memory
through one initialization parameter Enables the Oracle server to manage the amount of
memory allocated to the shared pool, Java pool,buffer cache, streams pool, and the large pool
Manually setting shared memory management:
Sizes the components through multiple individualinitialization parameters
Uses the Memory Advisor to makerecommendations
Perf MonTuning AdvAccess Adv
> MemoryStats
Invalid Obj
8/14/2019 Less13 Performance TB3
18/2813-18 Copyright 2005, Oracle. All rights reserved.
Enabling Automatic SharedMemory Management (ASMM)
Click Enable to enable
Automatic SharedMemory Management.
8/14/2019 Less13 Performance TB3
19/2813-19 Copyright 2005, Oracle. All rights reserved.
Enabling Automatic SharedMemory Management (ASMM)
Full Notes Page
8/14/2019 Less13 Performance TB3
20/2813-20 Copyright 2005, Oracle. All rights reserved.
Manually Setting SharedMemory Management
8/14/2019 Less13 Performance TB3
21/2813-21 Copyright 2005, Oracle. All rights reserved.
Using the Memory Advisor
8/14/2019 Less13 Performance TB3
22/2813-22 Copyright 2005, Oracle. All rights reserved.
V$SYSTEM_EVENT event total_waits total_timeouts
time_waited average_wait time_waited_micro
Dynamic Performance Statistics
V$SYSSTAT statistic# name class value stat_id
V$SESSION_EVENT sid event total_waits
total_timeouts time_waited average_wait max_wait time_waited_micro event_id
V$SESSTAT sid statistic# value
V$SERVICE_EVENT service_name service_name_hash event
event_id total_waits total_timeouts time_waited average_wait time_waited_micro
V$SERVICE_STATS service_name_hash service_name stat_id stat_name
value
Systemwide Session specific Service specific
Cumulative stats
Wait events
Access AdvMemory
> StatsInvalid Obj
8/14/2019 Less13 Performance TB3
23/2813-23 Copyright 2005, Oracle. All rights reserved.
Dynamic Performance StatisticsFull Notes Page
8/14/2019 Less13 Performance TB3
24/2813-24 Copyright 2005, Oracle. All rights reserved.
Instance/Database V$DATABASE V$INSTANCE V$PARAMETER V$SPPARAMETER V$SYSTEM_PARAMETER V$PROCESS V$BGPROCESS V$PX_PROCESS_SYSSTAT
V$SYSTEM_EVENT
Troubleshooting and Tuning Views
Disk V$DATAFILE V$FILESTAT V$LOG V$LOG_HISTORY V$DBFILE V$TEMPFILE V$TEMPSEG_USAGE V$SEGMENT_STATISTICS
Contention V$LOCK V$UNDOSTAT V$WAITSTAT V$LATCH
Memory V$BUFFER_POOL_STATISTICS V$LIBRARYCACHE V$SGAINFO V$PGASTAT
8/14/2019 Less13 Performance TB3
25/2813-25 Copyright 2005, Oracle. All rights reserved.
Invalid and Unusable Objects
Effect on Performance: PL/SQL code objects are recompiled. Indexes are rebuilt.
Perf MonTuning AdvAccess AdvMemoryStats
> Invalid Obj
8/14/2019 Less13 Performance TB3
26/28
13-26 Copyright 2005, Oracle. All rights reserved.
Invalid and Unusable ObjectsFull Notes Page
8/14/2019 Less13 Performance TB3
27/28
13-27 Copyright 2005, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how to: Use Enterprise Manager to monitor performance Tune SQL using the SQL Tuning Advisor
Tune SQL using the SQL Access Advisor Use Automatic Shared Memory Management Use the Memory Advisor to size memory buffers View performance-related dynamic views
Troubleshoot invalid and unusable objects
8/14/2019 Less13 Performance TB3
28/28
Practice Overview:Monitoring and Improving Performance
This practice covers the following topics: Detecting and repairing unusable indexes Using the SQL Tuning Advisor
Using the Performance page in EnterpriseManager