I’m planning on inserting a large amount of rows in my mysql database. At the moment i’m inserting about 8000 records in a almost empty table with no indexes (only primary key with autoincrement) using batches and using a mysql server (default install) on localhost (i7 6gb, fast hd)
It currently take about 2273 msec to insert 7679 records.
A single record looks like:
39492, 1.4618, 1.4619, 1.4606, 1.4613, 1199235602000, 0, 133
I was wondering if this is a normal average speed or that i should be worried because it it extremely slow?
I ask this because i have no reference when it comes to speed. And because of this i don’t know if my code is good or might be bugged because the speed is slow.
0.3 milliseconds per row is respectable performance, especially if you haven’t yet done anything to make your code run fast. If you have any indexes in your table the insertion rate may slow down as you get up to many thousands of rows already in the data base. Then you’ll need to see about disabling constraints, loading the table, and then re-enabling constraints. But you can cross that bridge if you come to it.