--Analysis TableDbms_stats.gather_table_stats--stored procedures for statistical tables(Ownnamevarchar2, TabNamevarchar2, PartNamevarchar2 default NULL, Estimate_percent Number defaultTo_estimate_percent_type (Get_param ('estimate_percent')), Block_sample Booleandefaultfalse, Method_optvarchar2 defaultGet_param ('method_opt'), Degree Number defaultTo_degree_type (Get_param ('degree')), granularityvarchar2 defaultGet_param ('Granularity'), CascadeBooleandefaultTo_cascade_type (Get_param ('Cascade')), Stattabvarchar2 default NULL, Statidvarchar2 default NULL, Statownvarchar2 default NULL, No_invalidate booleandefaultTo_no_invalidate_type (Get_param ('no_invalidate')), StatTypevarchar2 default 'Data', Force Booleandefaultfalse);--you can query User_tables, all_tables, dba_tables Data Dictionary views for statistical information after analysis. --you can use the Analyze statement to clear the statistics for a table in the data dictionary, with the following syntax:AnalyzeTable[schema.]Table Delete[system]Statistics; analyzeTableEmployeesDelete Statistics;--When you delete a table's statistics, the statistics for all indexes on that table are also deleted. --Validating table storage structureAnalyzeTable[schema.]TableValidate structure--[cascade--the integrity of the table, it also verifies the integrity of the indexes that are defined on the table. [complete--Full storage structure integrity validation for tables and their indexes, default values.] [Into[schema.]Table]--saves the rowid of the records returned with the corrupted data block to the user-defined table. [offline--does not allow DML operations on tables when the table is stored for structural integrity validation. The default value. |online]--If a table is stored for structural integrity validation, you must use the online parameter if a user has DML operations on the table . --Store structural integrity validation of tables online. This, while slightly impacting DML execution performance, provides greater flexibility for the table's storage structure integrity validation. ]|Fast--full structural integrity validation of tables and indexes takes a lot of resources, and the fast parameter can be used to validate the algorithm using the optimization validation method. --This validation method can quickly implement integrity validation on a table, but does not return details about the corrupted data block. ];@d: \app\administrator\product\11.2.0\dbhome_1\rdbms\admin\utlvalid.sql;--Create a default table Invalid_rowsAnalyzeTableEmployees validate structure;--Analysis Table@D: \app\administrator\product\11.2.0\dbhome_1\rdbms\admin\utlchn1. SQL;--chained_rows TableAnalyzeTable[schema.]TableList chained rows[into[schema.table]];--Analyze row links, row migration Scenarios
Oracle Database Maintenance Operations 2