|
select * from v$sysstat;
select t.num_rows, t.last_analyzed
from dba_tables t
where t.owner = 'HR'
and t.table_name = 'T04209_UNAME';
select * from dba_tab_col_statistics tcs
where tcs.owner='HR' and tcs.table_name='T04209_UNAME';
begin
dbms_stats.gather_table_stats(ownname => 'HR',
tabname =>'EMPLOYEES',
estimate_percent => 100,
method_opt =>'for columns salary size 254' );
end;
select t.num_rows, t.last_analyzed
from dba_tables t
where t.owner = 'HR'
and t.table_name = 'T04209_UNAME';
select * from dba_tab_col_statistics tcs
where tcs.owner='HR' and tcs.table_name='T04209_UNAME';
select * from dba_tab_col_statistics tcs
where tcs.owner='HR' and tcs.table_name='EMPLOYEES';
select * from dba_tab_pending_stats;
select * from dba_tab_histgrm_pending_stats;
begin
dbms_stats.gather_table_stats('HR','EMPLOYEES');
end;
select t.last_analyzed
from dba_tables t
where t.owner = 'HR'
and t.table_name = 'EMPLOYEES';
begin
dbms_stats.publish_pending_stats('HR','EMPLOYEES');
end;
begin
dbms_workload_repository.create_baseline(start_snap_id => 13,
end_snap_id => 14,
baseline_name => 'PRESERVE1314');
end;
|
|