Index information verification

Source: Internet
Author: User

1. Use tools to verify index information. For example, Oracle databases can use PL/SQL.


2. The indexes are verified by the data dictionary user_indexes and user_ind_columns.
Select IC. index_name, IC. column_name, IC. column_position col_pos, ix. uniqueness
From user_indexes IX, user_ind_columns IC
Where IC. index_name = IX. index_name
And IC. table_name = 'G _ chkunit'
And IC. index_name = 'idx _ g_chkunit_org ';


3. Verify the index based on the data dictionary dba_ind_columns.
Select a. index_name, A. column_name, A. column_position, A. column_length, A. char_length, A. Descend
From dba_ind_columns
Where a. table_owner = 'sgpm'
And a. table_name = 'G _ chkunit'
And a. index_name = 'idx _ g_chkunit_org ';


4. Use queries and execution plans to verify index information
Select rownum, org_no from g_chkunit where org_no <'000000' order by org_no ASC;


Execution result: rownum is ordered;

The execution plan shows that the query is indexed, so the query is sorted first and rownum is assigned, so the execution result is ordered.

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.