In Oracle9i, no system statistics are available per default. This means that, by default, the cost model is used. As of Oracle Database 10g, a default set of system statistics is always lable. As a result, by default, the CPU cost model is used. Actually, as of Oracle Database the only way to use the I/O cost model is to specify the hint no_cpu_costing at the SQL ement level. In all other cases, the query optimizer uses the CPU cost model.
System statistics are stored in the data dictionary table aux_stats$. Unfortunately, no data dictionary view is available to externalize them.
To gather noworkload statistics, you set the parameter gathering_mode of the procedure gather_system_stats to noworkload, as shown in the following example:
dbms_stats.gather_system_stats(gathering_mode => 'noworkload'); In Oracle9i, even if they are gathered, no statistics are stored in the data dictionary.
Only the column status in aux_stats$ is set to NOWORKLOAD.
Table 4-4. Data Dictionary Views Showing Object Statistics of Relational Tables
Object Table/Index-Level Statistics Partition-Level Statistics Subpartition-Level Statistics
Tables user_tab_statistics user_tab_partitions* user_tab_statistics
user_tables* user_tab_statistics user_tab_subpartitions*
Columns user_tab_col_statistics user_part_col_statistics user_subpart_col_statistics
user_tab_histograms user_part_histograms user_subpart_histograms
Indexes user_ind_statistics user_ind_statistics user_ind_statistics
user_indexes* user_ind_partitions*
user_ind_subpartitions*
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20542911/viewspace-615713/ ,如需转载,请注明出处,否则将追究法律责任。