How to organize order data

is doing order data statistical analysis, because the order quantity is too large, the order needs to be preprocessed. At present, the plan I think of is: 1. Keep the daily sales quantity and amount of member stores, but due to the low activity of most member stores, the daily sales of these member stores are 0. in this case, the "meaningless" data of the database accounts for a large part. 2. If you do not keep a record of zero sales for the day, then if you want to rank the sales of member stores within a certain regional time range, it is necessary to jointly query the sales table and the general table of member stores to get the results.

if there are tens of thousands of member stores, tens of thousands of pieces of data will be added every day in solution 1, and most of them are meaningless; if solution 2 is adopted, although the number of new data per day will be greatly reduced (perhaps only a few thousand or hundreds of items), it may also take a lot of time to do a joint survey of rankings.

I don"t know how to solve it in this situation. No, no, no.

Apr.04,2021

Statistical timeliness requirements are high-Space for time
Statistical timeliness requirements are low-time for space


Plan 3: can you add a burying point? That is, where effective sales may occur, do a buried point processing, and then will not let zero sales data into the processing of the intermediate table?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35b21-2bfaa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35b21-2bfaa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?