locked
What is the difference between cluster index and unique index RRS feed

  • Question

  • User264732274 posted

    at all any difference exist between cluster index and unique index ?

    please discuss it. thanks

    Wednesday, October 26, 2016 11:38 AM

Answers

  • User-821857111 posted

    A clustered index can be a unique index. A clustered index specifies the order in which rows in the database table are stored on disk.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 26, 2016 12:08 PM
  • User-654786183 posted

    Unique indexes are indexes that help maintain data integrity by ensuring that no two rows of data in a table have identical key values. You can have many unique indexes defined on the table (if needed).  Unique indexes provide additional information helpful to the query optimizer that can produce more efficient execution plans.

    A clustered index orders the data physically on the disk to match the index. It is useful if you access the data in the table very often via just one column, e.g. via the primary key. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order.  When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap.

    Please refer unique index and clustered index

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 26, 2016 1:15 PM

All replies

  • User-821857111 posted

    A clustered index can be a unique index. A clustered index specifies the order in which rows in the database table are stored on disk.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 26, 2016 12:08 PM
  • User-654786183 posted

    Unique indexes are indexes that help maintain data integrity by ensuring that no two rows of data in a table have identical key values. You can have many unique indexes defined on the table (if needed).  Unique indexes provide additional information helpful to the query optimizer that can produce more efficient execution plans.

    A clustered index orders the data physically on the disk to match the index. It is useful if you access the data in the table very often via just one column, e.g. via the primary key. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order.  When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap.

    Please refer unique index and clustered index

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 26, 2016 1:15 PM