MySQL Unique, Index, and Fulltext indexing. All together or one is enough? -
i wanted have 1 specific column unique , optimized searching , sorting. meanwhile same column should have fulltext search capability. should add 3 indexing types (unique, index, , fulltext) on column or not?
please , thanks.
--edit
thanks @fuujin quick comment.
what if have following indexing, no need adding "index" indexing anymore on neither of them, right?
alter table `mytable` add unique (`column_1`, `column_2`);
one column:
unique(x) fulltext(x)
adding index
redundant, since unique
is index
.
two columns:
unique(x,y) -- order depend on queries (see below) fulltext(x,y) fulltext(x), fulltext(y) -- may need these (see below)
where x > 5 , y = 2
needs (y,x)
order
if search 1 of 2 columns, such match(x) against(...)
, innodb, not myisam, needs fulltext
indexes.
Comments
Post a Comment