Questions about index fragmentation collection in Production Databases

Source: Internet
Author: User

Description: Environment: oracle10.2.0.5 RAC + HP-UX use the analyze index <index_name> validate structure statement to verify the degree of fragmentation of the index, then, we can query through the index_stats view. How much impact does this statement have on the System for Large indexes in the production database? Www.2cto.com FYI: analyze index <index_name> validate structure SQL> create table ttab (t1 int); Table created. SQL> create index ind_tab on ttab (t1); Index created. SQL> oradebug setmypidStatement processed. SQL> oradebug event 10704 trace name context forever, level 10; Statement processed. SQL> analyze index ind_tab validate structure; Index analyzed. SQL> oradebug tracefile_name/s01/admin/G10R25/ud Ump/g10r25_ora_25784.trc [root @ vrh8 ~] # Grep "ksqgtl \ *"/s01/admin/G10R25/udump/g10r25_ora_25784.trcksqgtl *** TX-00030007-000071e6 mode = 6 flags = 0x401 timeout = 0 *** ksqgtl * ** TM-00010183-00000000 mode = 4 flags = 0x401 timeout = 0 *** analyze index <index_name> validate structure should add share lock of TM mode = 4 on the table, block dml second: Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0-64bit ProductionWith the Partitionin G, OLAP, Data Mining and Real Application Testing options SQL> oradebug setmypidStatement processed. SQL> oradebug event 10704 trace name context forever, level 10; Statement processed. SQL> analyze index ind_tab validate structure online; Index analyzed. SQL> oradebug tracefile_name/s01/admin/G10R25/udump/g10r25_ora_25830.trc [root @ vrh8 ~] # Grep "ksqgtl \ *"/s01/admin/G10R25/udump/g10r25_ora_25830.trcksqgtl *** TX-0009002d-000072d7 mode = 6 flags = 0x401 timeout = 0 *** SQL> select * from index_stats; no rows selected analyze index ind_tab validate structure online ==> share lock on the table is not required, but the index_stats view is not filled. Therefore, validate structure online can only be used to verify whether the index has a commit error.

Related Article

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.