MySQL procedure-mysql more than 1 million data queries to use what technology

Source: Internet
Author: User
MySQL procedure mysql master phpmysql Chinese Linux

MySQL more than 1 million data query to use what technology can make the search speed improved? And the memory consumption will be reduced?

Reply content:

The simplest way to optimize queries is to index.
If you want to do a higher level of optimization will be specific problems specific analysis, others your table data is not to use, can split into more than one table?
There are also data that may not be queried can be saved by a history table.
The other is the business restrictions, such as the three months or six months to check the data. These methods are all methods of optimizing queries.
Further down is the optimization of SQL statements, which can be used to analyze SQL statements using query plans to find out where memory is time consuming.
When all the above methods have been tried, it is estimated that you need to expand the hardware to speed up the device.
In general there are many ways to optimize the query speed, depends on your problem.

Establish the corresponding index based on the criteria you are querying. Can improve query speed very well

First explain, print out the execution plan, according to the actual situation to optimize.

Reference from:
MySQL Optimization tutorial http://www.data.5helpyou.com/

Establish appropriate indexes, reasonable table structure (in-table, inter-table), and appropriate query SQL.
Start to think how to write an index, after all, query speed index is the most common, but if the volume of data is large, using some of the technology can also

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