Recorded statistics, should I use a database redundancy field or an instant query, or other way?

Source: Internet
Author: User
Title. Statistical fields are often displayed and updated very frequently, how to handle this type of data efficiently?
For example, SF's question answer number, the collection quantity, the poll number and so on statistic data. Please give a good solution, thank you!

Reply content:

Title. Statistical fields are often displayed and updated very frequently, how to handle this type of data efficiently?
For example, SF's question answer number, the collection quantity, the poll number and so on statistic data. Please give a good solution, thank you!

That's what I'm dealing with. I'll divide the table vertically. Then write on-demand delay.

For this type of data that is read and written frequently:
1. If the request volume is not particularly high can consider another maintenance of a innodb engine table, separate statistics, real-time query update basic can meet;
2. If the request volume is very high then consider storing in the in-memory database (for example, Memcache, Redis), if the data need to land (permanent storage, the memory database more or less the risk of data loss), plus a scheduled task timed to write data to the database, In case of data loss inside the memory can be re-read from the database.

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