MySQL Full-text search fulltext

Source: Internet
Author: User

MySQL Full-text search fulltext

To create the table 111CN first
You design the field, as long as there are title,body these two on the line,
Then MySQL or phpMyAdmin run one side statement
ALTER TABLE ' 111CN ' Add fulltext (' title ', ' Body ');

So we added a title and body combination Fulltext,

Here's an example.

SELECT Id,title, MATCH (title,body) against (' + 2010 Calendar calendars Calendar +youer ') from 111CN limit 0,5

Time consuming 0.09

SELECT * from ' 111CN ' WHERE to title like '% 2010 Calendar calendars% ' or body like '% 2010 Calendar calendars% ' 0,5

Time consuming 0.09

Just like the same as like

This test has only 500 data, if the above gap is big,
Note MySQL Full-text search only MyISAM storage way, remember InnoDB is not support Full-text search OH.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.