In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "detailed introduction of Analyze commands in Oracle". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the detailed introduction of Analyze commands in Oracle".
Use DBMS_STATS to collect statistics reference:
Summary of Oracle Statistic statistics
Http://blog.csdn.net/tianlesoftware/article/details/4668723
Oracle judges and manually collects statistics scripts
Http://blog.csdn.net/tianlesoftware/article/details/6445868
I. Purpose
Use the ANALYZE statement tocollect statistics, for example, to:
Use the analyze command to collect statistics, such as:
(1) Collect ordelete statistics about an index or index partition, table or table partition,index-organized table, cluster, or scalar object attribute.
-collect or delete statistics for objects
(2) Validate thestructure of an index or index partition, table or table partition, index-organizedtable, cluster, or object reference (REF).
-- verify the structure of the object
(3) Identifymigrated and chained rows of a table or cluster.
-- determine the migrated and chained rows of table or cluster.
For thecollection of most statistics, use the DBMS_STATS package, which letsyou collect statistics in parallel, collect global statistics for partitionedobjects, and fine tune your statistics collection in other ways.
In most cases, DBMS_STATS packages are used to collect statistics.
Usethe ANALYZE statement (rather than DBMS_STATS) for statisticscollection not related to the cost-based optimizer:
-- it is better to use the analyze command than dbms_stats package in the following two cases:
(1) To usethe VALIDATE or LIST CHAINED ROWS clauses
(2) To collectinformation on freelist blocks
II. Prerequisites
The schemaobject to be analyzed must be local, and it must be in your own schema or youmust have the ANALYZE ANY system privilege.
If you want tolist chained rows of a table or cluster into a list table, then thelist tablemust be in your own schema, or you must have INSERT privilege on thelist table, or you must have INSERT ANY TABLE systemprivilege.
If you want tovalidate a partitioned table, then you must havethe INSERT objectprivilege on the table into which you list analyzed rowids, or you must havethe INSERT ANY TABLE system privilege.
three。 Syntax
The detailed syntax is as follows:
ANALYZE TABLE tablenameCOMPUTE | ESTIMATE | DELETE STATISTICS ptnOption options
ANALYZE INDEX indexnameCOMPUTE | ESTIMATE | DELETE STATISTICS ptnOption options
ANALYZE CLUSTER clusternameCOMPUTE | ESTIMATE | DELETE STATISTICS options
PtnOption
PARTITION (partion)
SUBPARTITION (subpartition)
Options
VALIDATE STRUCTURE [CASCADE] [INTO tablename]
LIST CHAINED ROWS [INTOtablename]
COMPUTE | ESTIMATE STATISTICSFOR TABLE
COMPUTE | ESTIMATE STATISTICSFOR ALL COLUMNS
COMPUTE | ESTIMATE STATISTICSFOR ALL INDEXED COLUMNS
COMPUTE | ESTIMATE STATISTICSFOR COLUMNS [SIZE int] column [SIZE int]
When Estimating statistics youcan optionally
Specify
... ESTIMATE STATISTICSSAMPLE n ROWS
... ESTIMATE STATISTICSSAMPLE n PERCENT
four。 Semantics4.1 schema
Specify theschema containing the table, index, or cluster. If you omit schema, thenOracle Database assumes the table, index, or cluster is in your own schema.
4.2 TABLE table
Specify a tableto be analyzed. When you analyze a table, the database collects statisticsabout expressions occurring in any function-based indexes as well. Therefore,be sure to create function-based indexes on thetable before analyzing thetable. Refer to CREATEINDEX for more information about function-based indexes.
When you use analyze to collect statistics for a table, it also automatically collects information about the function index.
When analyzing atable, the database skips all domain indexesmarked LOADING or FAILED.
Indexes marked Loading or Failed are skipped when collecting statistics for the table.
For anindex-organized table, the database also analyzes any mapping table andcalculates its PCT_ACCESSS_DIRECT statistics. These statisticsestimate the accuracy of guess data block addresses stored as part of the localrowids in the mapping table.
Oracle Databasecollects the following statistics for a table. Statistics marked with anasterisk are always computed exactly. Table statistics, including the status ofdomain indexes, appear in the data dictionary views USER_TABLES, ALL_TABLES,and DBA_TABLES in the columns shown in parentheses.
-- Oracle analyze collects the following statistics from the table, in which those with an asterisk are collected accurately. The collected information is placed in the corresponding fields in user_tables,all_tables and dba_tables, and the corresponding fields are in parentheses below:
(1) Number of rows (NUM_ROWS)
(2) * Number of data blocks below thehigh water mark-the number of data blocks that have been formatted to receivedata, regardless whether they currently contain data or are empty (BLOCKS)
(3) * Number of data blocks allocatedto the table that have never been used (EMPTY_BLOCKS)
(4) Average available free space in eachdata block in bytes (AVG_SPACE)
(5) Number of chained rows (CHAIN_COUNT)
(6) Average row length, including therow overhead, in bytes (AVG_ROW_LEN)
4.2.1 Restrictions on AnalyzingTables
Analyzing tables is subject to thefollowing restrictions:
-- analyze table has the following restrictions:
(1) You cannotuse ANALYZE to collect statistics on data dictionary tables.
-- cannot collect datadictionary tables
(2) You cannotuse ANALYZE to collect statistics on an external table. Instead, youmust use the DBMS_STATS package.
Cannot collect external table. If you want to collect statistics for external tables, you need to use the DBMS_STATS package.
(3) You cannotuse ANALYZE to collect default statistics on a temporary table.However, if you have already created an association between one or more columnsof a temporarytable and a user-defined statistics type, then you canuse ANALYZE to collect the user-defined statistics on the temporarytable.
Cannot collect defaultstatistics of temporary table.
(4) You cannotcompute or estimate statistics for the following column types:
-- there is no need to calculate or estimate statistics for the following types of columns:
REF columntypes, varrays, nested tables, LOB columntypes (LOB columntypes are notanalyzed, they are skipped), LONG columntypes, or object types.However, if a statistics type is associated with such a column, then OracleDatabase collects user-defined statistics.
4.2.2 partition_extension_clause
Specify thepartition or subpartition, or thepartition or subpartition value, on which youwant statistics to be gathered. You cannot use this clause when analyzingclusters.
-- Partition can be specified when collecting statistics, but not when it is cluster.
If youspecify PARTITION and table is composite-partitioned, thenOracle Database analyzes all the subpartitions within the specified partition.
If the specified partition is a combined partition, all subpartitions are collected.
4.3 INDEX index
Specify an indexto be analyzed.
Oracle Databasecollects the following statistics for an index. Statistics marked with anasterisk are always computed exactly. For conventional indexes, when youcompute or estimate statistics, the statistics appear in the data dictionaryviews USER_INDEXES, ALL_INDEXES, and DBA_INDEXES in thecolumns shown in parentheses.
-- Analyze collects the following statistics of the index, plus the accurate collection of asterisks. For conventionalindex, the collected statistics can be viewed through user_indexes,all_indexes or dba_indexes, and the corresponding fields can be viewed in parentheses.
(1) * Depth of the index from its rootblock to its leaf blocks (BLEVEL)
(2) Number of leaf blocks (LEAF_BLOCKS)
(3) Number of distinct index values (DISTINCT_KEYS)
(4) Average number of leaf blocks foreach index value (AVG_LEAF_BLOCKS_PER_KEY)
(5) Average number of data blocks foreach index value (for an index on a table) (AVG_DATA_BLOCKS_PER_KEY)
(6) Clustering factor (how well orderedthe rows are about the indexed values) (CLUSTERING_FACTOR)
For domainindexes, this statement invokes the user-defined statistics collection functionspecified in the statistics type associated with the index (see ASSOCIATESTATISTICS). If no statistics type is associated with the domain index,then the statistics type associated with its indextype is used. If nostatistics type exists for either the index or its indextype, then nouser-defined statistics are collected. User-defined index statistics appear inthe STATISTICS column of the data dictionaryviews USER_USTATS, ALL_USTATS, and DBA_USTATS.
For domain indexes, collect user-defined indexstatistics information, which can be viewed through user_ustats,all_ustats and dba_ustats.
The official website's explanation of domain index:
A domain index is an index designed for a specializeddomain, such as spatial or image processing. Users can build a domain index ofa given type after the designer creates the indextype.The behavior. Of domain indexes is specific to an industry, a business function,or some other special purpose; you must specify it during cartridgedevelopment.
Http://docs.oracle.com/cd/E11882_01/appdev.112/e10765/dom_idx.htm#ADDCI4409
Restriction on AnalyzingIndexes
You cannotanalyze a domain index that is marked IN_PROGRESS or FAILED.
-domainindex statistics marked as in_progress and failed cannot be collected.
Note:
When you analyzean index from which a substantial number of rows has been deleted, OracleDatabase sometimes executes a COMPUTE statisticsoperation (which canentail a full table scan) even if you request an ESTIMATE statisticsoperation. Such an operation can be quite time consuming.
When we collect statistics, if a large amount of data on the table or index is deleted, then if we use compute or estimage to collect, we can do full table scan, so it will take a lot of time. Example:
SYS@anqing1 (rac1) > analyze table ttestimate statistics
Table analyzed.
SYS@anqing1 (rac1) > analyze table ttcompute statistics
Table analyzed.
SYS@anqing1 (rac1) > analyze indexidx_tt_id compute statistics
Index analyzed.
SYS@anqing1 (rac1) > analyze indexidx_tt_id estimate statistics
Index analyzed.
4.4 CLUSTER cluster
Specify acluster to be analyzed. When you collect statistics for a cluster, OracleDatabase also automatically collects the statistics for all the tables in thecluster and all their indexes, including thecluster index.
When collecting information about cluster, DB automatically collects statistics for all tables and indexes in cluster, including cluster index.
For both indexedand hash clusters, the database collects the average number of data blockstaken up by a single cluster key (AVG_BLOCKS_PER_KEY). These statistics appearin the data dictionary viewsALL_CLUSTERS, USER_CLUSTERS,and DBA_CLUSTERS.
4.5 validation_clauses
The validationclauses let you validate REF values and the structure of the analyzedobject.
4.5.1VALIDATE REF UPDATE Clause
Specify VALIDATE REF UPDATE tovalidate the REF values in the specified table, check the rowidportion in each REF, compare it with the true rowid, and correct it, ifnecessary. You can use this clause only when analyzing a table.
-- specify validate ref update to verify the value of ref. During the check, the rowid of each ref is compared with the real rowid of the table. If it is inconsistent, modify the value of ref.
If the owner ofthe table does not have SELECT object privilege on the referencedobjects, then Oracle Database will consider them invalid and set them to null.Subsequently these REF values will not be available in a query, evenif it is issued by a user with appropriate privileges on the objects.
-- if the users of the table do not have permission for the selectreferenced object, then DB will consider them invalid and set them to empty, because the ref value will not be available in subsequent queries, even if the user with permission republishes the ref values.
4.5.2 SET DANGLING TO NULL
SET DANGLING TO NULL setsto null any REF values (whether or not scoped) in the specified tablethat are found to point to an invalid or nonexistent object.
4.5.3 VALIDATE STRUCTURE
The syntax of Analyze is as follows:
ANALYZE INDEX
[PARTITION]
[SUBPARTITION]
VALIDATE STRUCTURE CASCADE
INTO
Select * from index_stats
ANALYZE TABLE
[PARTITION]
[SUBPARTITION]
VALIDATE STRUCTURE CASCADE
[INTO]
ANALYZE CLUSTER VALIDATE STRUCTURE CASCADE
INTO
Specify VALIDATE STRUCTURE tovalidate the structure of the analyzed object. The statistics collected by thisclause are not used by the Oracle Database optimizer.
(1) For a table,Oracle Database verifies the integrity of each of the data blocks and rows. Foran index-organized table, the database also generates compression statistics (optimal prefix compression count) for the primary key index on the table.
-- verify the integrity of each datablock and rows for table,DB. Compressionstatistics with primary key index is also generated for index-organized table,db.
(2) For acluster, Oracle Database automatically validates the structure of the clustertables.
-- for cluster,db automatically verifies the structure of clustertable.
(3) For apartitioned table, Oracle Database also verifies that each row belongs to thecorrect partition. If a row does not collate correctly, then its rowid isinserted into the INVALID_ROWS table.
For partitioned tables, db verifies that each row belongs to the correct partition, and if the row is not validated correctly, then the rowid is inserted into the invalid_rows table.
(4) For atemporary table, Oracle Database validates the structure of the table and itsindexes during the current session.
-- for temporary tables, db validates its indexes during structure and current session.
(5) For an index,Oracle Database verifies the integrity of each data block in the index andchecks for block corruption. This clause does not confirm that each row in thetable has an index entry or that each index entry points to a row in the table.You can perform. These operations by validating the structure of the table withthe CASCADE clause.
For indexes, db verifies the integrity of each index block and whether the block is corrupt. This command does not confirm whether the row of each table matches the row of the index.
Oracle Databasealso computes compression statistics (optimal prefix compression count) for allnormal indexes.
Oracle Databasestores statistics about the index in the data dictionaryviews INDEX_STATS and INDEX_HISTOGRAM.
-- Oracle stores index-related statistics in Index_stats and index_histogram.
If OracleDatabase encounters corruption in the structure of the object, then an errormessage is returned. In this case, drop and re-create the object.
-- if DB encounters corruption in the object's structure, it returns error, in which case drop and re-create objects are required.
4.5.3.1 INTO
The INTO clauseof VALIDATE STRUCTURE is valid only for partitioned tables.Specify a table into which Oracle Database lists the rowids of the partitionswhose rows do not collate correctly. If you omit schema, then the databaseassumes the list is in your own schema. If you omit this clause altogether,then the database assumes that the table is named INVALID_ROWS. The SQLscript. Used to create this table is UTLVALID.SQL.
-- into clause is only valid for partitioned tables. Specify a table to store incorrect data. If the user is ignored, it is considered to be the current user. If the table is ignored, it will be thought to represent INVALID_ROWS by default. The sql script to create this table is: $ORACLE_HOME/rdbms/admin/utlvalid.sql
[oracle@rac1 admin] $cat utlvalid.sql
Create tableINVALID_ROWS (
Owner_name varchar2 (30)
Table_name varchar2 (30)
Partition_name varchar2 (30)
Subpartition_name varchar2 (30)
Head_rowid rowid
Analyze_timestamp date
);
4.5.3.2 CASCADE
Specify CASCADE ifyou want Oracle Database to validate the structure of the indexes associatedwith the table or cluster. If you use this clause when validating a table, thenthe database also validates the indexes defined on the table. If you use thisclause when validating a cluster, then the database also validates all thecluster tables indexes, including thecluster index.
-- when cascade is specified, DB will also associate other related objects when validating objects, such as index associated tables, and tables will be associated with indexes. If you are validating cluster, associate cluster tables with indexes, including cluster index.
Bydefault, CASCADE performs a COMPLETE validation, which canbe resource intensive. Specify FAST if you want the database to checkfor the existence of corruptions without reporting details about thecorruption. If the FAST check finds a corruption, you can then usethe CASCADE option without the FAST clause to locate andlearn details about it.
By default, cascade executes complete validation, and if we specify FAST, only the existing corruptions is checked and the details of the corruption are not reported. If FAST check discovers corruption, you can use cascade to view the details.
If you use thisclause to validate an enabled (but previously disabled) function-based index,then validation errors may result. In this case, you must rebuild the index.
4.5.3.3 ONLINE | OFFLINE
Specify ONLINE toenable Oracle Database to run the validation while DML operations are ongoingwithin the object. The database reduces the amount of validation performed toallow for concurrency.
-- after you specify online, you can perform validate operations during DML, but this will degrade the performance of validation.
Note:
When youvalidate the structure of an object ONLINE, Oracle Database does notcollect any statistics, as it does when youvalidate the structure of theobject OFFLINE.
Note here that we mentioned earlier that the collected information will be stored in Index_stats and index_histogram when validate is performed. If we specify ONLINE, the statistics information will not be written to the index_stats view.
Specify OFFLINE,to maximize the amount of validation performed. This settingprevents INSERT, UPDATE, and DELETE statements fromconcurrently accessing the object during validation but allows queries. This isthe default.
-- OFFLINE is the default value, which is also the best performance. However, offline blocks the object's insert,update and delete operations during validation.
Therefore, we can consider using validatestructure online online verification method for online business, but validate strucutre online also has its disadvantage, that is, structural verification information under online will not be written into index_stats and index_histogram.
4.5.3.4 Restriction on ONLINE
You cannotspecify ONLINE when analyzing a cluster.
-- online cannot be used on cluster objects.
4.6 LIST CHAINED ROWS
The details of chained rows are described in the next section. Let's first look at the command syntax:
ANALYZE TABLE LISTCHAINED ROWS
INTO
ANALYZE CLUSTER LISTCHAINED ROWS INTO
LIST CHAINED ROWS letsyou identify migrated and chained rows of the analyzed table or cluster. Youcannot use this clause when analyzing an index.
Cannot be used on an index.
Inthe INTO clause, specify a table into which Oracle Database lists themigrated and chained rows. If you omit schema, then the database assumesthe chained-rows table is in your own schema. If you omit this clausealtogether, then the database assumes that the table isnamed CHAINED_ROWS. The chained-rows table must be on your local database.
When executing this command, into specifies the table that holds the linked data, and if no table is specified, db assumes that the table name is CHAINED_ROWS.
You can createthe CHAINED_ROWS table using one of these scripts:
-- this table is not created by default. We need to create this table before we can store data:
(1) UTLCHAIN.SQL usesphysical rowids. Therefore it can accommodate rows from conventional tables butnot from index-organized tables. (See the Note that follows.)
(2) UTLCHN1.SQL usesuniversal rowids, so it can accommodate rows from both conventional andindex-organized tables.
-- you can use any of the above scripts to create chained_rows tables.
If you create your own chained-rows table, then it must follow the format prescribed by oneof these two scripts.
If you areanalyzing index-organized tables based on primary keys (rather than universalrowids), then you must create a separate chained-rows table for eachindex-organized table to accommodate its primary-key storage.
Use the SQLscripts DBMSIOTC.SQL and PRVTIOTC.PLB to definethe BUILD_CHAIN_ROWS_TABLE procedure, and then execute this procedureto create an IOT_CHAINED_ROWS table for each such index-organizedtable.
4.7 DELETE STATISTICS
Specify DELETE STATISTICS todelete any statistics about the analyzed object that are currently stored inthe data dictionary. Use this statement when you no longer want Oracle Databaseto use the statistics.
When you usethis clause on a table, the database also automatically removes statistics forall the indexes defined on the table. When you use this clause on a cluster,the database also automatically removes statistics for all the cluster tablesand all their indexes, including the cluster index.
When we delete the statistics of a table, DB automatically remove all indexes statistics on the table.
Specify SYSTEM ifyou want Oracle Database to delete only system (not user-defined) statistics.If you omit SYSTEM, and if user-defined column or index statistics werecollected for an object, then the database also removes the user-definedstatistics by invoking the statistics deletion function specified in the statisticstype that was used to collect the statistics.
V. Chained Rows related instructions
The size of each Block is limited, and when a single data block does not have enough space to hold a new row of records or an updated row of records, there are two solutions: rowchaining and rowmigration.
Row chaining is what we call chained rows, that is, the chain phenomenon.
Before my blog:
Oracle block Block description
Http://blog.csdn.net/tianlesoftware/article/details/6414765
Section 9.5 in is explained: Chained and MigratedRows
Row chaining:
Row migration:
When a row ischained or migrated, the I/O needed to retrieve the data increases. Thissituation results because Oracle Database must scan multiple blocks to retrievethe information for the row.
When a large amount of chained or migrated is produced, it will have an impact on the Imax O. The speed of accessing this data starts to slow down, as the additional iUnix o and the latches associated with the iUnip o increase the access time, and the efficiency of the buffer cache begins to decline because two blocks need to be cached, and if there is no row migration, only one block is cached. In addition, the size and complexity of the table have increased.
The chaining phenomenon can be effectively avoided by adjusting the PCTFREE parameters. According to the different management methods of segment space, the related parameters are also different. The default table space uses Locallymanaged tablespaces, which is divided into utomatic segment space management (ASSM) and manual segment space management (MSSM). This section refers to:
Oracle automatic Segment Space Management (ASSM:autosegment space management)
Http://blog.csdn.net/tianlesoftware/article/details/4958989
Row migration is prohibited by default and can be verified by the following SQL:
SYS@anqing1 (rac1) > select d.row_movement from dba_tables d where table_name='TT'
ROW_MOVE
-
DISABLED
Enable row migration:
SQL > alter table table_name enable row movement
Shrink and FlashbackTable can only be used if row migration is enabled, which is detailed in this section:
Oracle 10g Shrink Table details
Http://blog.csdn.net/tianlesoftware/article/details/4764254
Summary of Oracle Flashback Technology
Http://blog.csdn.net/tianlesoftware/article/details/4677378
Since chained row has a significant impact on performance, we need to monitor it. This is what our analyze is for. But the collected row with chaining needs to be saved in a table. When we finish analyze, we will see how much chaining data there is in this table.
And before we can execute the analyze command, we must first create this table, otherwise an error will be reported. We can use $ORACLE_HOME/rdbms/admin/utlchain.sql to create this table:
[root@rac1 ~] # cd $ORACLE_HOME/rdbms/admin
[root@rac1 admin] # cat utlchain.sql
Create table CHAINED_ROWS (
Owner_name varchar2 (30)
Table_name varchar2 (30)
Cluster_name varchar2 (30)
Partition_name varchar2 (30)
Subpartition_name varchar2 (30)
Head_rowid rowid
Analyze_timestamp date
);
Once created, you can execute the analyze command:
ANALYZE TABLE LISTCHAINED ROWS
INTO
ANALYZE CLUSTER LISTCHAINED ROWS INTO
six。 Example 6.1 verify Chained row
-- No chained_rows table was created, which is the default table name:
SYS@anqing1 (rac1) > select * from CHAINED_ROWS
Select * from CHAINED_ROWS
*
ERROR at line 1:
ORA-00942: table or view does not exist
-- failed to execute analyze without creating chained_row table:
SYS@anqing1 (rac1) > Analyze table tt list chained rows
Analyze table tt list chained rows
*
ERROR at line 1:
ORA-01495: specified chain row table notfound
-- create a table and execute the Analyze command:
SYS@anqing1 (rac1) > @? / rdbms/admin/utlchain.sql
SYS@anqing1 (rac1) > Analyze table tt listchained rows
Table analyzed.
-then query the chained_row table:
SYS@anqing1 (rac1) > select * fromCHAINED_ROWS
No rows selected
Here is the test table. I don't have any data. A test data on the official website is as follows:
SELECT owner_name, table_name, head_rowid,analyze_timestamp
FROM chained_rows
ORDER BY owner_name, table_name, head_rowid, analyze_timestamp
OWNER_NAME TABLE_NAME HEAD_ROWID ANALYZE_TIMESTAMP
OE ORDERS AAAAZzAABAAABrXAAA25-SEP-2000
6.2verifying structure
For ordinary tables, you can execute the command directly:
SYS@anqing1 (rac1) > analyze table ttvalidate structure
Table analyzed.
-- specify cascade and online:
SYS@anqing1 (rac1) > analyze table ttvalidate structure cascade online
Table analyzed.
For partitioned tables, db verifies that each row belongs to the correct partition, and if the row is not validated correctly, then the rowid is inserted into the invalid_rows table.
-- by default, the invalid_rows table is not created, and the creation script is:
$ORACLE_HOME/rdbms/admin/utlvalid.sql
Refer to the partition table:
Summary of Oracle partition tables
Http://blog.csdn.net/tianlesoftware/article/details/4717318
We created a partition table pt.
SYS@anqing1 (rac1) > analyze table ptvalidate structure
Analyze table pt validate structure
*
ERROR at line 1:
ORA-14508: specified VALIDATE INTO tablenot found
Into and invalid_rows must be specified for validation of partitioned tables.
SYS@anqing1 (rac1) > @? / rdbms/admin/utlvalid.sql
SYS@anqing1 (rac1) > analyze table ptvalidate structure into invalid_rows
Table analyzed.
SYS@anqing1 (rac1) > analyze table ptvalidate structure cascade online into invalid_rows
Table analyzed.
-- after the analyze is completed, you can view the invalid_rows table:
SYS@anqing1 (rac1) > select * frominvalid_rows
No rows selected
6.3 Delete statistics
SYS@anqing1 (rac1) > analyze table ttdelete statistics
Table analyzed.
This command deletes the statistics of the table and all its indexes.
Summary:
Since Oracle 8i, analyze has "validate" verification function, and is functionally divided with DBMS_STATS package. Analyze is mainly responsible for verifying the structure of table and index and linked row (chained and migrated rows) information, and DBMS_STATS package is mainly responsible for the management of statistical information.
In the above instructions and tests, a lot of space has also been spent to illustrate the use of analyze in validate and list chained rows.
At the beginning, it is mentioned that Analyze works better than DBMS_STATS packages in the following two cases.
(1) To usethe VALIDATE or LIST CHAINED ROWS clauses
(2) To collectinformation on freelist blocks
Thank you for your reading. The above is the content of "detailed introduction of Analyze commands in Oracle". After the study of this article, I believe you have a deeper understanding of the detailed introduction of Analyze commands in Oracle, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.