How Schema/Table Statistics Work?
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?
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?
0