How to filter log data of large batches of users

Source: Internet
Author: User
How to filter the log data of large batches of users? for example, the table a & nbsp; is designed as follows: Table a & nbsp; is the basic information of million users (unique uid) uid, name, region, service provider .... table B & nbsp; each user has about 100 data records, that is, 100 million x 100.1 billion data records. Each piece of data contains uid, time1, time2uid, and time1 (user ID, start time, and close time). how can I filter log data of large volumes of users?
For example, million users

The table is designed as follows:
Table a is the basic information of million users (unique uid)
Uid, name, region, service provider ....


Table B has about 100 data records for each user, that is, 100 million x 100 = 0.1 billion million data records. Each data entry includes (user ID, start time, and close time)
Uid, time1, time2
Uid, time1, time2
...

Requirement: count the number of users in a 24-hour period and collect statistics based on a region and a service provider.
------ Solution --------------------
What are the number of users in a 24-hour period.
------ Solution --------------------
0.1 billion million data records are not large, but a reasonable index is required.
------ Solution --------------------
Do it once a day, and then put the statistical results into a table record. The next time you directly read the data from the table, you do not need to make statistics every time.
------ Solution --------------------


Reference:
Do it once a day, and then put the statistical results into a table record. The next time you directly read the data from the table, you do not need to make statistics every time.


Creating indexes and caching data are both an optimization method.

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.