Database Administration (MOSC)

MOSC Banner

Two ways gather stats in 11.2.0.3 what is the best

edited Apr 18, 2013 5:24AM in Database Administration (MOSC) 3 commentsAnswered ✓
Hi experts.I have the following two ways of gathering the stats for the schemas, what method is the best?

 How to Gather Optimizer Statistics on 11g [ID 749227.1]

Gathering statistics for all objects in a schema


exec dbms_stats.gather_schema_stats( -
 ownname => '  Schema_name ', -
cascade => TRUE, -
method_opt => 'FOR ALL COLUMNS SIZE AUTO' );

execute dbms_stats.gather_schema_stats(ownname=>'<Schema_name>', DEGREE=> 5,CASCADE=>TRUE,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE);



Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center