I've read many posts in SO and some of them are advising to compile all INSERT statements then do mysqli_multi_query
but some of them says you should execute each INSERT query one at a time for better performance. What is the best way to upload 9000+ rows of records to MySQL database?
The file is from CSV file so I use fgetcsv to read each then I create an INSERT statement for each records/rows so I can execute them all at once with
mysqli_multi_query`. Now I am trying to modify that code to turn it into a prepared-statement type to be safe but I want to know the best way to do this first so I won't have to modify the code ever again.
Is it advisable to call each INSERT query?