How does PHP search for large amounts of data?

Source: Internet
Author: User
There are hundreds of thousands of of data in the MySQL database. How to search with PHP?
Be fast. Search for the name of the book


Reply to discussion (solution)

MySQL inside, why use PHP search?

Do website AH ~

Only hundreds of thousands of, you need to consider the database optimization, such as index, table partition, Master and slave.

Only by rationalizing the structure of the data table, or by making the query statement simplify some additional requirements ...

Hundreds, it's not too much. MySQL is easy to handle. Of course, if your SQL statement is not well-written, it will be very slow. You can take a specific SQL statement and ask you to ask how you are going to solve your problem.

Reasonable index, reasonable table structure, try full-text index.

1. Index
2. It only takes a few seconds to pick up the index

If the light database takes a few seconds, plus the speed limit, the front page and other factors, then the user opens the page may have to wait more than 10 seconds
Better keep the database in less than 1-2 seconds.

First, you built the index no, second, is there a memcache?

1. Use the full TEXT INDEX provided by the MyISAM engine;
2, using SOLR.

  • 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.