MySQL Large data size averaging

Source: Internet
Author: User

Requirements are: For a device, the average of every hour of the day, the average of one months per day, the more general requirement is, from the start time to the end time, every time, to find an average.
The current solution is to process in the stored procedure, from the start time to the end time, cut into segments, to find out the average of each segment, merged together.
Problem: There are serious performance issues when there is a large amount of data. For example: The average of one months per day, the amount of data involved will be very large, the query is very time-consuming. There is no benchmark test, and the specific time consumption is uncertain.
Workaround: The idea now is to create a new mean table that periodically writes the average of a period of time to the table. Later from the average table inside the query.

MySQL Large data size averaging

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.