CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1

    Cluster or unique index MySql DB?

    Hi men!
    I have one interesting question.
    what is difference between cluster index and unique index? What's better and faster and why?
    Thanks for watching.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Cluster or unique index MySql DB?

    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2016
    Posts
    23

    Re: Cluster or unique index MySql DB?

    CLUSTER INDEXES are used to sort and store data rows in the table and they are viewed based on the rows. There can be only one cluster index for one table because the data is stored in the rows in an order. The cluster index does not constraint you from adding non unique key data. but a clustered index key needs to uniquely identify a row, even if it's created on a column containing duplicate entries.

    UNIQUE CLUSTERED INDEX is created only on a column or combination of columns that contains no duplicate data. Since Unique keyword is used to create this index, it constraint the users from adding duplicate data or non unique data.
    Last edited by Claire_Anderson; October 15th, 2016 at 01:03 AM.
    Claire

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured