MySQL full-text indexing function and open method?

Source: Internet
Author: User

General database search are used SQL like statements, like statements can not use the index, each query is from the first traversal to the last one, query efficiency is extremely low. With general data above 100,000 or too many online, like queries can cause a database crash. This is why many programs provide only the reason for the title search, because if the search content, it is more slow, tens of thousands of data will not move.
Mysql Full-text indexing is specially designed to solve the problem of fuzzy query, the whole article can be indexed in advance according to the word, the search efficiency is high, can support millions data retrieval.

The Full-text indexing feature is supported from MySQL 4.0, but the default minimum index length for MySQL is 4. If the English default is more reasonable, but the majority of Chinese words are 2 characters, which leads to less than 4 words can not be indexed, full-text indexing function is not in name. Most of the domestic space vendors may not have noticed the problem, and have not modified the default settings for Mysql.

If you are using your own server, please set it right away and don't waste it.
If you are using a virtual host, please contact the space trader immediately to modify the configuration. First of all, Mysql's default value is a wrong setting for Chinese, and modifying the settings equals correcting the error. Second, this configuration modification is simple, a matter of minutes, and improved search efficiency also reduces the chances of the space business database being dropped. If you send this article to the space trader, I believe most of them will be willing to change.

To set the method:
Please contact the server administrator to modify My.ini, after [mysqld] add a line of "Ft_min_word_len=1", and then restart MySQL, and then login to the site background (module management-> full station search) to rebuild Full-text indexing, otherwise you will not be able to use the full station search feature.

Related Article

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.