now there is a reading reward log table with approximately 100 million data (storage size 50G)
table structure, id,num (number of), uid (users id), acid (article id), ac_url (article path), atime,channel (channel)
now this table has three commonly used query statements
1. Use uid to query the cumulative number of readings for this user sum (num)
2. Use atime to accumulate the number of reading awards within the time range sum (num)
3. Use uid+atime query to accumulate the number of reading awards sum (num)
now that the above query is very slow, how to operate sub-tables or partitions?
if you query according to the time range of tables 2 and 3 per day, don"t you have to join queries every time?
does it only improve the efficiency of 1 query according to the last four digits of the user"s id? Time query or joint query
and how the old data is written to the sub-table as quickly as possible, and so on.
sincerely ask for advice on how to solve the problem. Thank you?!