Simple description of SQL Server three index and its use

Source: Internet
Author: User

Brief introduction:

1, unique: Unique index, the value of each record of the field cannot be duplicated.

2. Clustered: A clustered index, which can contain more than one column, is faster than a nonclustered index, but only one per table.

3, nonclustered: Nonclustered index, single use, can improve the retrieval performance, but will increase the data stored on the hard disk, that is, the space to change the time

How to use:

CREATE [UNIQUE] [CLUSTERED | Nonclustered] INDEXindex_name on <table_name>(column_name[ASC | DESC] [,... N] )       [With <backward_compatible_index_option> [,... n] ]      [On {filegroup_name | "Default"}]  

A simple example:

Create Clustered Index OPDE_BIID_CD  on Opde (BIID)

Usage Recommendations:

Simple description of SQL Server three index and its use

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.