I am trying to figure out the best way to get MySQL to use batch updates.
I create, let's say, 10,000 records. Each record needs to be inserted into the DB like so:
for 1 to 10000
1) insert into table1
2) get auto increment id from table1 (call it table1ID)
3) use table1ID to insert into table2
next
I don't see an easy way to batch that scenario. Maybe batch table1 insert 10,000 times, then get all table IDs, then another batch of 10,000 inserts to table2. But then I need to make sure all my inserts match. For each insert into table1 I need the correct insert into table2.