Optimizing mysql fulltext search

后端 未结 3 1985
耶瑟儿~
耶瑟儿~ 2020-12-05 19:23

I want to make a search with fulltext in my web. I need the search with a pagination. my database have 50,000+ rows/per table. I have alter my table and make (title,c

3条回答
  •  粉色の甜心
    2020-12-05 19:39

    Based on the question's follow-up comments, you've a btree index on your columns rather than a full text index.

    For MATCH (title,content) against search, you would need:

    CREATE FULLTEXT INDEX index_name ON tbl_name (title,content);
    

    I'm not sure it'll accept the date field in there (the latter is probably not relevant anyway).

提交回复
热议问题