Dbms_stats, dbmsjob

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.