What do Clustered and Non clustered index actually mean?

前端 未结 11 1916
粉色の甜心
粉色の甜心 2020-11-22 06:40

I have a limited exposure to DB and have only used DB as an application programmer. I want to know about Clustered and Non clustered indexes. I goo

11条回答
  •  逝去的感伤
    2020-11-22 07:38

    Find below some characteristics of clustered and non-clustered indexes:

    Clustered Indexes

    1. Clustered indexes are indexes that uniquely identify the rows in an SQL table.
    2. Every table can have exactly one clustered index.
    3. You can create a clustered index that covers more than one column. For example: create Index index_name(col1, col2, col.....).
    4. By default, a column with a primary key already has a clustered index.

    Non-clustered Indexes

    1. Non-clustered indexes are like simple indexes. They are just used for fast retrieval of data. Not sure to have unique data.

提交回复
热议问题