Monday, April 22, 2013

ORACLE


SQL

#copy data from 1 table to other
> insert INTO NEW (select * FROM OLD);

#Gather Table stats
> EXECUTE dbms_stats.gather_table_stats(ownname=> 'SCHEMA_NAME',
tabname=> 'TABLE_NAME' ,
estimate_percent=> DBMS_STATS.AUTO_SAMPLE_SIZE,
cascade=> DBMS_STATS.AUTO_CASCADE,
degree=> null,
no_invalidate=> DBMS_STATS.AUTO_INVALIDATE,
granularity=> 'AUTO',
method_opt=> 'FOR ALL COLUMNS SIZE AUTO');

No comments:

Post a Comment