Oracle statistics information stored in the data dictionary, and latitude from more detailed information in the Oracle database objects is described.
1, Table statistics DBA_TABLES
2, the index statistics DBA_INDEXES
3, column statistics DBA_TAB_COLS
4, system statistics
5, data dictionary statistics
6, internal object statistics
Library statistics: exec dbms_stats.flush_database_monitoring_info;
Collect user statistics exec dbms_stats.gather_schema_stats ( 'ODS', cascade => true, degree => 16, no_invalidate => false);
Delete library statistics: exec dbms_stats.delete_schema_stats ( 'VISE');
Lock library statistics: exec dbms_stats.lock_schema_stats ( 'VISE');
Unlocked library statistics: exec dbms_stats.UNlock_schema_stats ( 'VISE');
Query is locked library statistics: select owner, table_name, STATTYPE_LOCKED from dba_tab_statistics where owner = 'VISE';
Table statistics:
1、统计表信息 exec dbms_stats.gather_table_stats(ownname => 'ODS',tabname => 'SYM_RB_AGREEMENT_TERM',cascade => true,estimate_percent => 0.1,force=> true,no_invalidate => false);
2, delete information tables: exec dbms_stats.delete_table_stats (ownname => user, tabname => 'T1', cascade_indexes => true);
3, unlocked table statistics: exec dbms_stats.unlock_table_stats ( 'vise', 'B_S_NIN_CTS_ACCT_BAL');
4, the lock table statistics: exec dbms_stats.lock_table_stats ( 'VISE', 'B_S_NIN_CTS_ACCT_BAL');
5, check whether the lock table statistics: select owner, table_name, STATTYPE_LOCKED from dba_tab_statistics where owner = 'VISE' and table_name = 'B_S_NIN_CTS_ACCT_BAL';
6, check whether there is table statistics: select * from DBA_tab_col_statistics where owner = 'ODS' and table_name = 'B_S_NIN_CTS_ACCT_BAL';