Jump to content

Mysql Index


designanddev

Recommended Posts

Primary - every table should have one of these and it is a unique identifier for each row in the table. It usually, but not necessarily, an auto_incrementing identifier.

 

Unique - similar to a primary. You may have more than one candidate identifier for the primary, eg Employee table has employee number as the primary key but you want to constrain the data so that their national insurance numbers are also unique (and username for company intranet) so define these as unique to prevent insertion of duplicates.

 

Index - values do not have to be unique but, like a book, they enable fast lookup of records.

 

Fulltext - gives powerful word searching capabilities on fields eg find all articles (title and body) that contain macintosh or apple but not raincoat or newton. Fulltext searches can also give a relevancy score depending on how many of the search terms are contained allowing you to get the most relevant first

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.