So I am working on an existing codebase and the function takes each row from a csv, formats the data and then inserts it into the db. This whole process takes about ~20 minutes with the rows in the CSV. However if I keep everything the same and remove the line that actually does the database entry
$this->db->replace('my_table', $myObject);
The whole code runs in about 2 seconds. So I am wondering is it possible to store all of the objects and then assign them all to the DB at once? I am thinking of doing 1 sql call instead of thousands and thousands. Thoughts ?