Oracle
Oracle supports both automated and manual statistics gathering.
The job GATHER_STATS_JOB
is created automatically when the database is created, and is
used to automatically gather statistics on all objects in the database that have missing or stale statistics.
The scheduler manages the GATHER_STATS_JOB
. The job runs when the maintenance window is
opened. For more information about automatic statistics gathering, see the Oracle database maintenance and
administration documentation.
Alternatively, it is possible to manually gather statistics by using the DBMS_STATS
package.
Sample runstats scripts are provided, which gather statistics on all FTM tables and the indexes. Your database administrator (DBA) needs to review these scripts before deployment because they might be suitable for use in a test or development environment and not a production environment.
runRunstats.cmd [DB Name] [DB Schema]
runRunstats.sh [DB Name] [DB Schema]
For more information about more complex usage of DBMS_STATS
for manual statistics
gathering, see the Oracle database documentation.
Reorganization of data is possible by using user-written scripts. But it is typically done by starting the Reorg Wizard that uses the Enterprise Manager Console, which allows for reorganization of an entire table space, schema, or specific schema objects. For more information, see the Oracle documentation.