How can I optimize a single server for real-time query? One of the ip tables is frequently written into php + mysql.

Source: Internet
Author: User
How can I optimize a single server for real-time query? One of the ip tables is frequently written into php + mysql. how can I optimize a single server for real-time queries? One of the ip tables is frequently written.
Php + mysql

The company asked us to build a management system. the finance-related data should be real-time and only be provided to one server.


Reply to discussion (solution)

What data is mainly queried? what is ip write frequency used?

What data is mainly queried? what is ip write frequency used?

The ip address is written into the access IP address and the number of times and time. the amount payable is calculated by querying the data.

We recommend that you paste the table structure and expected results to make it easier to understand.

Add an index to the table

You don't have to talk about indexes. now we think of partitions.

"Ip table writing frequency"
Frequently written tables should reduce indexes,
This table should not need to be modified (delete/replace/update). you can use the archive engine

"Ip table writing frequency"
Frequently written tables should reduce indexes,
This table should not need to be modified (delete/replace/update). you can use the archive engine

Well, I need this voice. Thank you!

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.