|
- select e.employee_id, d.department_name
- from hr.employees e, hr.departments d
- where e.department_id=d.department_id;
-
- select t.table_name , t.owner , t.num_rows
- from dba_tables t where t.table_name='T04209_UNAME';
-
- select i.index_name, i.owner , i.blevel , i.leaf_blocks
- from dba_indexes i where i.owner='HR' and i.table_name='T04209_UNAME';
- select * from dba_tab_col_statistics tcs where tcs.table_name='T04209_UNAME';
- select * from dict where table_name like '%HISTOG%';
- select * from DBA_TAB_HISTOGRAMS th where th.table_name='T04209_UNAME';
- begin
- dbms_stats.gather_database_stats;
- end;
- select * from DBA_TAB_STAT_PREFS ;
- begin
- dbms_stats.set_table_prefs(ownname => 'HR',
- tabname => 'T04209_UNAME',pname => 'METHOD_OPT', pvalue=> 'for columns uvalue size 100') ;
- end;
-
- begin
- dbms_stats.gather_table_stats('HR','T04209_UNAME');
- end;
- select * from dba_tab_col_statistics tcs where tcs.table_name='T04209_UNAME';
- begin
- DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE (
- start_snap_id =>30,
- end_snap_id =>31,
- baseline_name =>'MYBASELINE2');
-
- end;
复制代码
|
|