In MySQL, does a UNIQUE index act like a quick search for a varchar column?

If I have a column short_titlein a MySQL table and it is defined as UNIQUE, do I also need to add FULLTEXT to find it quickly? Or does UNIQUE already guarantee that it will be searchable quickly (without a full table scan)?

Thanks, Boda Sido

+3
source share
1 answer

UNIQUEwill find verbal short_titleusing the base index.

If you need word matching (as opposed to word-for-word matching), use FULLTEXTindex.

, B-Tree MyISAM VARCHAR . :

, VARCHAR .

MD5 BINARY(16), UNIQUE ( ) .

+3

Source: https://habr.com/ru/post/1734292/


All Articles