In the case of large data volumes, how can we achieve task count statistics for this month and task count statistics for this week?

Source: Internet
Author: User
Do you need to create two tables for this month and this week to record the number of tasks for each month and every week? Which of the following friends knows and asks for help. Do you need to create two tables for this month and this week to record the number of tasks for each month and every week? Which of the following friends knows and asks for help.

Reply content:

Do you need to create two tables for this month and this week to record the number of tasks for each month and every week? Which of the following friends knows and asks for help.

If multiple tables are operated asynchronously, you need to add and update the data in each table. I wonder if it is appropriate

What is the size of the data?Primary key ID.
When will the two tables be updated after maintenance? Maintenance of statistical tables affects business processes.

1. write data from the last month to the Redis List.
2. write a script that runs automatically in the early morning, remove the first element from the list, and insert the task of the current day to the end of the list.
3. the preceding scenarios are suitable for tasks in the last month and in the last week.

Portal

If the table is written to the last month rather than the last 30 days, the index year, month, and week numbers are included.

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.