Dbms_stats, dbmsjob
All function packages of dbms_stats are as follows:
GATHER_INDEX_STATS: Analyze index information
GATHER_TABLE_STATS: analysis table information. When cascade is set to true, the analysis table and column (INDEX) Information
GATHER_SCHEMA_STATS: Analysis Solution Information
GATHER_DATABASE_STATS: analyzes database information
GATHER_SYSTEM_STATS: Analyze System Information
EXPORT_COLUMN_STATS: analysis information of the exported Column
EXPORT_INDEX_STATS: Export Index analysis information
EXPORT_SYSTEM_STATS: Export System Analysis Information
EXPORT_TABLE_STATS: export table analysis information
EXPORT_SCHEMA_STATS: Export Solution Analysis Information
EXPORT_DATABASE_STATS: Export Database Analysis Information
IMPORT_COLUMN_STATS: Import column analysis information
IMPORT_INDEX_STATS: import index analysis information
IMPORT_SYSTEM_STATS: import system analysis information
IMPORT_TABLE_STATS: Import table analysis information
IMPORT_SCHEMA_STATS: Import Solution Analysis Information
IMPORT_DATABASE_STATS: import database analysis information
Exec dbms_stats.gather_schema_stats (
Ownname => 'Scott ',
Options => 'Collect auto ',
Estimate_percent => dbms_stats.auto_sample_size,
Method_opt => 'for all columns size repeat ',
Degree => 15
);
Exec dbms_stats.gather_table_stats (OWNNAME => 'tcs', tabname => 'emp', cascade => true );
ANALYZE
{TABLE [schema.] table
[PARTITION (partition) | SUBPARTITION (subpartition)]
| INDEX [schema.] index
[PARTITION (partition) | SUBPARTITION (subpartition)]
| CLUSTER [schema.] cluster
}
{COMPUTE [SYSTEM] STATISTICS [for_clause]
| ESTIMATE [SYSTEM] STATISTICS [for_clause] [SAMPLE integer {ROWS | PERCENT}]
| Validation_clauses
| List chained rows [comment _clause]
| DELETE [SYSTEM] STATISTICS
};
What Does oracle mean by dbms_statsgather_table_stats?
Call the dbms_stats.gather_table_stats package to count the statistics of User table T, columns, and indexes.
Similar to analyze table.
Run DBMS_STATSGATHER_TABLE_STATS in oracle PROCEDURE.
This may be caused by the special permission structure of the stored procedure. procedure requires the displayed authorization,
Refer to the following articles:
Plsql can execute other user objects, but the process does not work (AUTHID CURRENT_USER)
Www.cnblogs.com/..4.html