iSelfSchooling.com - Since 1999  References  |  Job Openings
    Home  | Search more  | Oracle Syntax  | Computer Institute   | (Login or Register to access to VIDEOS)
 

Copyright & User Agreement

   Suggestions Email2aFriendHomepage us! |  Bookmark

Services

  Vision/Mission

  Services

  Biography

  Contact Us

 FREE Training

  Start...

  SQL

  PL/SQL

  Forms 

  Reports

  DBA Fundamentals

  Performance

  Prepare for OCP

  ShareUrNotes

...

  Acknowledgement

  Who is who

  University Directory

  Links...

 

 

 

What is the best option to used in dbms_stats in order to get the most accurate statistics within a schema?

More Resources by Google:

By: John Kazerooni

 

To rebuild all statistics to all the tables and indexes and building up all histograms, you should do the following:

 

SQL> EXECUTE dbms_stats.gather_schema_stats(

                        ownname => 'Username',
                        method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO',
                        cascade=>TRUE);


But if you want to let Oracle decide which statistices are to be rebuild, you should the following statment:

 

SQL> EXECUTE dbms_stats.gather_schema_stats(

                        ownname => 'Username',
                        options => 'GATHER AUTO',  -- for Oracle8i use GATHER only
                        cascade=>TRUE);

Good Luck!

 

 
 
Google
 
Web web site