(I have a feeling I'm missing something here ... )
I would have thought they're pretty self explanatory?
KEY is your basic column index. It's a quick reference to values stored in rows for the column the index is applied to. Indexes speed up SELECTS by allowing MySQL to scan the index for matches rows rather than having to load and scan the entire table which it would do in the case of no [applicable] indexes.
UNIQUE as it's name implies requires rows to contain unique values for the indexed column. As far as I'm aware, it alone cannot aid MYSQL in optimising SELECT statements like a KEY index can.
PRIMARY KEY is both UNIQUE and INDEX.
FULLTEXT indexes individual words in a CHAR, VARCHAR or TEXT column.
There isn't much more to it than that.
Unless you mean the storage methods for indexes. Which can be HASH (only available to MEMORY / HEAP tables), BTREE or RTREE, but they're just the file format that the index is stored in. Never bothered to find out if there is any advantage of using one over the other.
|