|
- 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 );
复制代码- select * from dba_views v
- where v.view_name='DBA_ALERT_HISTORY';
-
- select * from dict d
- where d.table_name like '%ACTIVE%';
-
- select * from dba_views v
- where v.view_name='DBA_HIST_ACTIVE_SESS_HISTORY';
复制代码- select t.TABLE_NAME
- from dba_tables t
- where t.OWNER='SYS' and t.TABLESPACE_NAME='SYSAUX'
- and t.TABLE_NAME like 'WRH$%'
- order by t.TABLE_NAME;
-
- select * from v$asm_diskgroup;
-
- select t.TABLE_NAME
- from dba_tables t
- where t.OWNER='SYS' and t.TABLESPACE_NAME='SYSAUX'
- and t.TABLE_NAME like 'WRI$%'
- order by t.TABLE_NAME;
-
- select t.TABLE_NAME
- from dba_tables t
- where t.OWNER='SYS' and t.TABLESPACE_NAME='SYSAUX'
- and t.TABLE_NAME like 'WRM$%'
- order by t.TABLE_NAME;
-
-
- select * from WRM$_snapshot;
-
- select t.TABLE_NAME
- from dba_tables t
- where t.OWNER='SYS' and t.TABLESPACE_NAME='SYSAUX'
- and t.TABLE_NAME like 'WRR$%'
- order by t.TABLE_NAME;
复制代码
- SQL> exec dbms_stats.gather_table_Stats('HR','TABC') ;
- PL/SQL procedure successfully completed.
- SQL> insert into tabc values ( 'a1' ,1 ) ;
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> create index iabc on tabc ( uname ) ;
- Index created.
- SQL> insert into tabc values ( 'a2' ,2 ) ;
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> exec dbms_stats.gather_table_Stats('HR','TABC') ;
- PL/SQL procedure successfully completed.
- SQL>
复制代码- select t.NUM_ROWS, t.LAST_ANALYZED
- from dba_tables t
- where t.OWNER='HR' and t.TABLE_NAME='TABC';
-
- select i.NUM_ROWS , i.LAST_ANALYZED
- from dba_indexes i
- where i.OWNER='HR' and i.INDEX_NAME='IABC';
复制代码- SQL> insert into tabc select * from t04209_uname where uvalue > 2 ;
- 99998 rows created.
- SQL> commit;
- Commit complete.
- SQL> update tabc set uvalue=100 where uvalue < 99900 ;
- 99899 rows updated.
- SQL> commit;
- Commit complete.
- SQL> exec dbms_Stats.gather_table_stats('HR','TABC') ;
- PL/SQL procedure successfully completed.
- SQL> begin
- 2 for i in 1..100
- 3 loop
- 4 update tabc set uvalue=i where uname = 'a'||to_char(i);
- 5 end loop;
- 6 commit;
- 7 end;
- 8 /
- PL/SQL procedure successfully completed.
- SQL> exec dbms_stats.gather_table_stats ('HR', 'TABC' , estimate_percent=>100 , method_opt=>'for all columns size auto for columns uvalue size 254' );
- PL/SQL procedure successfully completed.
复制代码- SQL> exec dbms_stats.gather_table_stats ('HR', 'TABC' , estimate_percent=>100 , method_opt=>'for all columns size skewonly') ;
- PL/SQL procedure successfully completed.
复制代码- begin
- dbms_stats.gather_schema_stats('HR');
- end;
- select * from dict where table_name like 'DBA_%PREF%';
- select * from DBA_TAB_STAT_PREFS;
- select dbms_stats.get_prefs('method_opt') from dual;
复制代码- select * from v$fixed_table
- where name like 'V$%STAT';
- select * from v$fixed_table
- where name like 'V$%CLASS%';
- select wait_class from V$SYSTEM_WAIT_CLASS;
复制代码
- select s.sid, s.SQL_HASH_VALUE, s.SQL_ID
- from v$session s
- where s.sid in ( 40, 272 );
复制代码
|
|