Home > Software engineering >  Questions about being single table data query statistics
Questions about being single table data query statistics

Time:09-22

There is now a table data in about 4 kw, use the select sum (sales_price) from tables, queries, unexpectedly let the mysql service stopped, result in unable to statistics, do you have a good way to do this

CodePudding user response:

You first look at the error log, why will stop the mysql service, general this abnormal stop service operation, there will be a record, and that is probably the reason why, is because the memory is not enough, or the file size limit, or the operating system to kill the mysql, may,

In addition, the simple method to speed up the query speed, is to give sales_price fields and indexes,

CodePudding user response:

Big data processing for redundant data,
According to month/commodity classification to make all kinds of intermediate data (data volume control is before class),
Final query again from the intermediate data statistics, there is an index of performance is not the problem,
  • Related