The company is building a crm system. There are many data statistics that need to be recorded in the database.
For example, record the number of customers each employee has per day, the number of tracking records, whether the number of customers per day reaches the standard, whether the number of tracking records reaches the standard, etc.
The current solutions that come to mind are two:
1. Record these statistical data in a table.
2. Each statistical data is recorded in a separate table.
I don’t know which way is better? Or is there any other better and more complete implementation?
Is there anyone who has done this function? Can you give me some advice? Thank you very much
The company is building a crm system. There are many data statistics that need to be recorded in the database.
For example, record the number of customers each employee has per day, the number of tracking records, whether the number of customers per day reaches the standard, whether the number of tracking records reaches the standard, etc.
The current solutions that come to mind are two:
1. Record these statistical data in a table.
2. Each statistical data is recorded in a separate table.
I don’t know which way is better? Or is there any other better and more complete implementation?
Is there anyone who has done this function? Can you give me some advice? Thank you very much
It is recommended to enable scheduled statistics in the background
If you consider that the amount of data in the later period will be relatively large, it is recommended to put it in each table separately, because if the amount of data in the later period is large, the table will still have to be split. It is better to split it now. Don't forget to create relevant indexes.