Database Tuning (MOSC)

MOSC Banner

How Schema/Table Statistics Work?

edited Dec 9, 2013 5:09PM in Database Tuning (MOSC) 4 commentsAnswered
Hi Friends,
I have a job that gathers the schema stats and table stats. ABC is the schema name and the tables also belong to ABC.

Here is the script that runs daily.


If I run the whole sql...


vi gather_schema_stats.sql
exec dbms_stats.GATHER_SCHEMA_STATS ('ABC', CASCADE=>TRUE);  --> Does oracle gather statistics for all the objects in the schema? Or does Oracle gather statistics only for the modified objects in the schema?
exec dbms_stats.GATHER_TABLE_STATS (ownname=>'ABC',tabname =>'LCD'); Does oracle gather statistics of the table even if there are no changes made ? or does it gather statistics only if there are any changes in the table and what percentage of changes?

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