Due to the fact that the previous performance was not fully considered, the data in a daily report was too large (more than five hundred MB) and the query was very slow.
Due to the incomplete consideration of previous work capabilities, the data in a daily report is too large (more than five hundred MB) and the query is very slow. today, I plan to separate the content field of the daily report, create a table separately, and then perform associated queries only when viewing the detailed daily report. The speed will be significantly improved.
Because I don't know much about mysql, the default idea is to use php to read the original table cyclically, and then insert the content and id fields into the new table... This is an extremely inefficient practice! As I got off work, Zheng Ge taught me how to use SQL statements to complete my work for a long time... Alas...
Use the create method to save some fields in the original table as a new table. The statement is as follows:
Create table 'report _ content' (SELECT id, content FROM 'report ');
One sentence, my God !! We can see how important it is to learn SQL as a web developer !!