The customer gave a basic data sheet and then made me a lot of calculations, and the dynamic / static did the statistical analysis report. After a two-month hard work, finally finished. Experience as follows:
1. A table that stores intermediate statistics results is necessary. If the statistical analysis of the customer needs to be calculated by the calculation to display, it is best, after all, in the process of querying is a very annoying Things, although there is data redundancy, it simplifies the efficiency problem that data is possible with multi-table association.
2, the appropriate preservation of the data in a statistical time period will not intentionally, reduce the many operations of the associated itself.
3. If the migration of the database is not considered, try to use the stored procedure to improve the efficiency of statistical analysis. If the statistics are very important, if the amount of data is very efficient, if the demand analysis, the module segmentation is appropriate, the stored procedure written It is easy to migrate.
4. If the amount of data is large, it is also a feasible policy to consider segmentation storage data.
5, many times to use a temporary table will increase your program to perform a few times.
6. The establishment of indexes should consider many factors, and inappropriate indexes lead to the efficiency of query statistics.
7, multi-customer communication is the key to your project progress guarantee, don't wait for all the results that make customers a one-time overturned after you think.