ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 学习VALIDATE STRUCTURE

学习VALIDATE STRUCTURE

原创 Linux操作系统 作者:tolywang 时间:2010-09-20 14:19:43 0 删除 编辑

VALIDATE STRUCTURE

Specify VALIDATE STRUCTURE to validate the structure of the analyzed object. The statistics collected by this clause are not used by the Oracle Database optimizer, as are statistics collected by the COMPUTE STATISTICS and ESTIMATE STATISTICS clauses.

  • For a table, Oracle Database verifies the integrity of each of the data blocks and rows. For an index-organized table, the database also generates compression statistics (optimal prefix compression count) for the primary key index on the table.

  • For a cluster, Oracle Database automatically validates the structure of the cluster tables.

  • For a partitioned table, Oracle Database also verifies that each row belongs to the correct partition. If a row does not collate correctly, then its rowid is inserted into the INVALID_ROWS table.

  • For a temporary table, Oracle Database validates the structure of the table and its indexes during the current session.

  • For an index, Oracle Database verifies the integrity of each data block in the index and checks for block corruption. This clause does not confirm that each row in the table 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 with the CASCADE clause.

    Oracle Database also computes compression statistics (optimal prefix compression count) for all normal indexes.

    Oracle Database stores statistics about the index in the data dictionary views INDEX_STATS and INDEX_HISTOGRAM.


    See Also:

    Oracle Database Reference for information on these views

If Oracle Database encounters corruption in the structure of the object, then an error message is returned to you. In this case, drop and re-create the object.

=============================================================================  

例子:  


SQL> analyze  index   dfms.IDX1_WIP_D_WO_DETAIL_COMID  validate structure ;

select name, del_lf_rows, lf_rows, round((del_lf_rows/(lf_rows+0.0000000001))*100)
"Frag Percent"  from index_stats   where   name = 'IDX1_WIP_D_WO_DETAIL_COMID'  ;


SQL> select name, del_lf_rows, lf_rows, round((del_lf_rows/(lf_rows+0.0000000001))*100)
  2   "Frag Percent"  from index_stats   where   name = 'IDX1_WIP_D_WO_DETAIL_COMID'  ;


NAME                                                 DEL_LF_ROWS    LF_ROWS    Frag Percent
------------------------------ ----------- ---------- ------------
IDX1_WIP_D_WO_DETAIL_COMID         1732765    1817931           95 

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-674476/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: ASM 学习
请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    14696701