|
AWR的4类:
- select substr ( t.table_name , 3,1 ) , count(*) from
- dba_tables t where
- t.owner='SYS' and t.tablespace_name='SYSAUX'
- and t.table_name like 'WR_$%'
- group by substr ( t.table_name , 3,1 ) ;
复制代码 | SUBSTR(T.TABLE_NAME,3,1) | COUNT(*) | 1 | R | 15 | 2 | H | 100 | 3 | I | 80 | 4 | M | 10 |
AWR H类 来自对应V$视图:
- select t.table_name from
- dba_tables t where
- t.owner='SYS' and t.tablespace_name='SYSAUX'
- and t.table_name like 'WR_$%ACTIVE%' ;
复制代码 | TABLE_NAME | 1 | WRH$_ACTIVE_SESSION_HISTORY_BL |
- select t.table_name from
- dict t where t.table_name like 'V$%ACTIVE_SESSION%' ;
复制代码 | TABLE_NAME | 1 | V$ACTIVE_SESSION_HISTORY |
-------------------------------------------------------------------------------------------------------
- select dbms_stats.get_prefs(pname => 'ESTIMATE_PERCENT') from dual;
- begin
- dbms_stats.set_table_prefs(ownname => 'HR',tabname => 'EMPLOYEES',
- pname => 'ESTIMATE_PERCENT',pvalue => 100);
- end;
- select * from dba_tab_stat_prefs;
复制代码 | OWNER | TABLE_NAME | PREFERENCE_NAME | PREFERENCE_VALUE | 1 | SH | SALES | STALE_PERCENT | 13 | 2 | SH | SALES | METHOD_OPT | FOR ALL COLUMNS SIZE AUTO FOR COLUMNS AMOUNT_SOLD SIZE 254 | 3 | HR | EMPLOYEES | ESTIMATE_PERCENT | 100 |
- select dbms_stats.get_prefs(pname => 'METHOD_OPT') from dual;
复制代码 | DBMS_STATS.GET_PREFS(PNAME=>'M | 1 | FOR ALL COLUMNS SIZE AUTO |
-------------------------------------------------------------------------------
- begin DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS(23040,60); end;
复制代码
-------
- begin
- DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE (
- start_snap_id =>119,
- end_snap_id => 120,
- baseline_name =>'BASELINE2');
- end;
复制代码
------
SAA一般要选 删除无效对象:
|
|