Gather Stats In Oracle
You must gather statistics on a regular basis to provide the optimizer with information about schema objects.
oracle configurationintermediate
by OracleDba
17 views
You must gather statistics on a regular basis to provide the optimizer with information about schema objects.
123456789101112
col table_name for a15
select table_name, to_char(last_analyzed,'DD-MON-YYYY HH24:MI:SS') from dba_tables where owner='SYS' AND TABLE_NAME = 'TESTTABLE';
exec DBMS_STATS.GATHER_SCHEMA_STATS(ownname,estimate_percent, block_sample, method_opt,degree,granularity,cascade,stattab, statid,options,statown ,no_invalidate, gather_temp,gather_fixed)
exec dbms_stats.gather_table_stats(‘Schema_name’, ‘Table_name’);
exec dbms_stats.gather_table_stats(‘abc_schema’, ‘Employee’);
exec dbms_stats.gather_index_stats(‘table_name’, ‘Index name’);
exec dbms_stats.delete_schema_stats(‘abc_Schema’);Please to add comments
No comments yet. Be the first to comment!