开发者

Simple Select query returning zero rows

开发者 https://www.devze.com 2023-03-28 21:06 出处:网络
I\'m trying this simple query: SELECT * FROM `Users` WHERE MATCH (`User`) AGAINST (\'User\') LIMIT 5 I have a FU开发者_JS百科LLTEXT index on column User.

I'm trying this simple query:

SELECT * FROM `Users` WHERE MATCH (`User`) AGAINST ('User') LIMIT 5

I have a FU开发者_JS百科LLTEXT index on column User.

EXPLAIN SELECT returns:

id  select_type table   type    possible_keys   key key_len ref rows    Extra
1   SIMPLE  Users   fulltext    user_comparator user_comparator 0       1   Using where

What am I doing wrong?


if 50% or more of your column user has the phrase 'User' in it, it would be considered common and would not match any rows. if you are dealing with a small amount of data you could always use the 'like' comparator.

0

精彩评论

暂无评论...
验证码 换一张
取 消