in reply to Re: How to optimized mysql insert into table
in thread How to optimized mysql insert into table
Where in your program do you loop over your input file?
You are talking about 100,000 inserts but your program is only ever doing one insert.
Maybe you can show us a real program that does more than one insert.
My suggestion for doing more than one insert is to use a loop and to prepare the statement handles outside of the loop and to do the ->commit calls every 1000 inserts or something like that.
Also, consider using the native data loading functionality of MySQL instead of hand-feeding the data to your database.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to optimized mysql insert into table
by Anonymous Monk on Jan 17, 2017 at 18:00 UTC | |
by Corion (Patriarch) on Jan 17, 2017 at 18:07 UTC |