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

Copyright & User Agreement

   Suggestions Email2aFriendHomepage us! |  Bookmark

Services

  Vision/Mission

  Services

  Biography

  Contact Us

  Post Notes

 FREE Training

  Start...

  SQL

  PL/SQL

  Forms 

  Reports

  DBA Fundamentals

  Performance

  Prepare for OCP

...

  Acknowledgement

  Who is who

  University Directory

  Links...

 

 

 

FREE Online Oracle Training for beginners and advanced - The most comprehensive Oracle tutorial

The authors do not guarantee or take any responsibility for the accuracy, or completeness of the information.

BASICS

SQL | PL/SQL

DEVELOPERS

FORMS 2 | REPORTS | Other TOOLS

DBAs

FUNDAMENTALS 2 | PERFORMANCE | OEM

ADVANCE

APPLICATION SERVER | GRID CONTROL | ARTICLES 2 3 4

Advanced - Articles I

Lesson 01 | Lesson 02 | Lesson 03 | Lesson 04 | Lesson 05 | Lesson 06 | Lesson 07 | Lesson 08 | Lesson 09 | Lesson 10 | Lesson 11 | Lesson 12 | Lesson 13 | Lesson 14 | Lesson 15 | Lesson 16 | Lesson 17 | Lesson 18 | Lesson 19 | Lesson 20 | Lesson 21 | Lesson 22 | Lesson 23 | Lesson 24 | Lesson 25 | Lesson 26 | Lesson 27 | Lesson 28 | Lesson 29 | Lesson 30 | Lesson 31 | Lesson 32 | Lesson 33 | Lesson 34 | Lesson 35 |

Lesson 30

"You are the people who are shaping a better world. One of the secrets of inner peace is the practice of compassion."

-Dalai Lama (1935 -)

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

 

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);

 

 

 
 
Google
 
Web web site