Is there a better way to process a 300,000 line text file data and insert it into MySQL?
问题 What I'm doing right now is reading the contents of the text file and store it in a variable. After reading the whole content, I run a loop for the chunk data and in there call a function that will read to each line of the chunk data and pass every line to another function that process the processing of each column of data and inserting it in the database by batch. The batch is the whole chunk. The code process too long for every file with more than 500KB size. My problem is there is no