1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.
-
Upload
octavia-harmon -
Category
Documents
-
view
227 -
download
2
Transcript of 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.
![Page 1: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/1.jpg)
14Copyright © 2004, Oracle. All rights reserved.
Performance Monitoring
![Page 2: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/2.jpg)
14-2 Copyright © 2004, Oracle. All rights reserved.
Objectives
After completing this lesson you should be able to do the following:
• Troubleshoot invalid and unusable objects
• Gather optimizer statistics
• View performance metrics
• React to performance issues
![Page 3: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/3.jpg)
14-3 Copyright © 2004, Oracle. All rights reserved.
Performance Monitoring
Memory allocation
issues
Memory allocation
issues
Input/outputdevice
contention
Input/outputdevice
contention
Application code
problems
Application code
problems
Resourcecontention
Resourcecontention
Network bottlenecks
Network bottlenecks
?DBA
![Page 4: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/4.jpg)
14-4 Copyright © 2004, Oracle. All rights reserved.
Monitoring Methodologies
• Reactive
• Proactive– Server-generated alerts– Automated Database Diagnostic Monitor (ADDM)
![Page 5: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/5.jpg)
14-5 Copyright © 2004, Oracle. All rights reserved.
Database and Instance Metrics
Several hundred different performance statistics are available through:
• Data dictionary
• Dynamic performance views
• Optimizer statistics
DBA
![Page 6: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/6.jpg)
14-7 Copyright © 2004, Oracle. All rights reserved.
Data Dictionary Metrics
Object status:
• PL/SQL code objects
• Indexes
![Page 7: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/7.jpg)
14-8 Copyright © 2004, Oracle. All rights reserved.
Invalid and Unusable Objects
• PL/SQL code objects are recompiled.
• Indexes are rebuilt.
![Page 8: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/8.jpg)
14-10 Copyright © 2004, Oracle. All rights reserved.
Optimizer Statistics
Optimizer statistics are:
• Not real-time
• Persistent across instance restarts
SQL> SELECT COUNT(*) FROM hr.employees;
COUNT(*)
----------
214
SQL> SELECT num_rows FROM dba_tables
2 WHERE owner='HR' AND table_name = 'EMPLOYEES';
NUM_ROWS
----------
107
![Page 9: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/9.jpg)
14-12 Copyright © 2004, Oracle. All rights reserved.
Manually Gather Optimizer Statistics
• If database was not created with the DBCA
• If tables are extremely volatile
![Page 10: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/10.jpg)
14-13 Copyright © 2004, Oracle. All rights reserved.
Automate Optimizer Statistics Collection
Use the Oracle Scheduler to automate customized statistics collection.
![Page 11: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/11.jpg)
14-14 Copyright © 2004, Oracle. All rights reserved.
Schedule Optimizer Statistics Collection
Statistics should be gathered as needed to ensure the optimizer can make appropriatedecisions.
![Page 12: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/12.jpg)
14-15 Copyright © 2004, Oracle. All rights reserved.
Dynamic Performance Views
Dynamic Performance views are:
• Real-time
• Non-persistent across instance restarts
SQL> SELECT name, value FROM v$sysstat
2 WHERE name='sorts (memory)' ORDER BY name;
NAME VALUE
--------------- ----------
sorts (memory) 1979183
SQL> /
NAME VALUE
--------------- ----------
sorts (memory) 1979184
![Page 13: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/13.jpg)
14-16 Copyright © 2004, Oracle. All rights reserved.
Viewing Metric Information
• Use the All Metrics link in the Related Links region.
• Drill-down for in-depth analysis.
![Page 14: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/14.jpg)
14-17 Copyright © 2004, Oracle. All rights reserved.
Reacting to Performance Issues
Use Enterprise Manager to:
• Find key performance issues
• Drill down to the root cause
![Page 15: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/15.jpg)
14-18 Copyright © 2004, Oracle. All rights reserved.
Reacting to Performance Issues
Drill down into performance measurements to identify bottlenecks
• Key bottleneck: log buffer space
![Page 16: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/16.jpg)
14-19 Copyright © 2004, Oracle. All rights reserved.
Summary
In this lesson you should have learned how to:
• Troubleshoot invalid and unusable objects
• Gather optimizer statistics
• View performance metrics
• React to performance issues
![Page 17: 14 Copyright © 2004, Oracle. All rights reserved. Performance Monitoring.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649e7f5503460f94b83cde/html5/thumbnails/17.jpg)
14-20 Copyright © 2004, Oracle. All rights reserved.
Practice 14: Monitoring Performance
This practice covers the following:
• Viewing performance metrics
• Repairing unusable indexes
• Manually collecting optimizer statistics
• Automating statistics collection