01. sub-library sub-table database - Analysis

Outline

Task-for example, if we need to divide the table, need to focus on two o'clock
1. increase the amount of data to determine the number of sub-table
in query and update data scene, determined by the kind of way points table


data analysis

Table 1. Structure

Field name Types of description
id long Primary key
student_id long Student id
teacher_id long Teachers id
task_name varchar mission name
create_time datetiem Created

2. The amount of daily tasks
Mean: 347,348

date Assignments date Assignments
2020-03-01 225925 2020-03-13 387824
2020-03-02 424014 2020-03-14 184733
2020-03-03 428069 2020-03-15 168003
2020-03-04 428821 2020-03-16 515914
2020-03-05 420984 2020-03-17 434955
2020-03-06 367536 2020-03-18 406467
2020-03-07 202577 2020-03-19 385732
2020-03-08 184836 2020-03-20 347008
2020-03-09 430492 2020-03-21 186037
2020-03-10 471406 2020-03-22 179031
2020-03-11 401931 2020-03-23 396231
2020-03-12 387274 2020-03-24 370556

Here Insert Picture Description
3. month assignments
The average monthly number of tasks: 7901876

month Assignments
October 2019 5971953
November 2019 7248057
December 2019 9418330
January 2020 5297569
February 2020 10926496
March 2020 8548852


4. May Live users
May Live users: 225,534
The average monthly user tasks: 35

month Number of active users Monthly increment The average amount of user growth
2019-10 193368 5971953 31
2019-11 214237 7248057 34
2019-12 255763 9418330 37
2020-01 199287 5297569 27
2020-02 262315 10926496 42
2020-03 228235 8779162 38

Scene analysis

After confirming the product, according to the table below scene
teacher terminal
1. Teacher disposed task
2. Teachers teardown
3. See task completion teachers

Students end
1. Students view the list of tasks
2. Students complete the task

The scene can be seen through the use of operations on the table can be acquired current user, user id apparent modulus range or sub-table, but the user id fell on our task table is really two fields (student_id, teacher_id), considering the high degree of aggregation of job data, we grouped according to school id. Table does not currently exist in the school id, it is necessary to end the teachers and students to end the operation table for the current user id to their schools, because the user corresponds school_id relatively unchanged, redis can be cached, add a school id minimal impact on performance.

Published 43 original articles · won praise 28 · views 50000 +

Guess you like

Origin blog.csdn.net/u014395955/article/details/105123686