AWR data is owned by user SYSMAN and stored in SYSAUX tablespace.
Amount of statistics gathered is defined by parameter statistics_level
There are three possible options:
BASIC - practically disables statistics gathering, very few is saved.
TYPICAL - standard level
ALL - same as TYPICAL but also keeps the execution plans and timing information from the operating system
The statistics are kept in AWR for 7 days by default.
To change the collection interval and retention period DBMS_WORKLOAD_REPOSITORY package can be used. Like this:
exec dbms_workload_repository.modify_snapshot_settings(interval=>90,retention=>8640);This sets interval to 90 minutes and retention to 8640 minutes (this makes 6 days or something)
After the statistics snapshot is taken, a process named ADDM (automatic database diagnostic monitoring) analyzes newly gathered information and compares it with two previously taken snapshots. By comparing these three, it can identify potential performance problems and suggest possible remedies. The main goal is to minimize the DBTime, which is being CPU and WAIT time put together for non-idle database users.
To get the list of snapshots:
SELECT * FROM dba_hist_snapshot;To take snapshot manually:
EXECUTE dbms_workload_repository.create_snapshot('TYPICAL');To delete snapshots:
exec dbms_workload_repository.drop_snapshot_range(begin_snap_id, end_snap_id);To get a text ADDM report:
@?/rdbms/admin/addmrpt.sqlAdditionally the following views can be queried to get the ADDM findings: DBA_ADVISOR_FINDINGS, DBA_ADVISOR_OBJECTS, DBA_ADVISOR_RECOMMENDATIONS, DBA_ADVISOR_RATIONALE
There is also a number of special-purpose advisors which include:
- SQL Tuning Advisor
- SQL Access Advisor
- Memory Advisor
- Mean Time To Recover Advisor
- Segment Advisor
alter table "SCOTT"."T2" enable row movement;
alter table "SCOTT"."T2" shrink space;
- Undo Management Advisor
No comments:
Post a Comment