- System Statistics can be collected and displayed for CBO to use and apprehend CPU and system I/O information. For each plan candidate, the optimizer computes estimates for I/O and CPU costs.
- Invoke the dbms_stats.gather_system_stats procedure as an elapsed time capture, making sure to collect the statistics during a representative heavy workload
- How to collect these statistics.easist way of it is
execute dbms_stats.gather_system_stats('Start');
-- one hour delay during high workload
execute dbms_stats.gather_system_stats('Stop');
Here are the data items collected by dbms_stats.gather_system_stats: we can query it from aux_stats$ system view
select * from aux_stats$;No Workload (NW) stats::CPUSPEEDNW - CPU speedIOSEEKTIM - The I/O seek time in millisecondsIOTFRSPEED - I/O transfer speed in millisecondsWorkload-related stats:SREADTIM - Single block read time in millisecondsMREADTIM - Multiblock read time in msCPUSPEED - CPU speedMBRC - Average blocks read per multiblock readMAXTHR - Maximum I/O throughputSLAVETHR - OPQ Factotum (slave)
- If the hardware or workload has changed these statistics must be refreshed.
- If the workload differs from day to nigth (run OLTP during the day and DSS at night) then statistics can be exported to a table and One job may be scheculed to import statistics before begining of night and day
See also:
Gather Optimizer Statistics For Sys
Gather Optimizer Statistics For Sys
No comments:
Post a Comment