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
https://forums.phpfreaks.com/topic/272542-mysql-index/#findComment-1402316
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.