mysql-random-data-generator
mysql-random-data-generator copied to clipboard
Slow? It seems to only insert about 400 rows per second.
Generating 10,000 rows in a table of 10 columns of VARCHAR(25) plus an auto-increment int primary key (11 columns total). Hardware is very powerful. 4 core, 24GB RAM, on NVME drives (the hardware is actually much larger, but this is a container and those are the constraints).
Might I be doing something wrong? Or is that pretty typical?
I was able to speed this up, and I'd be happy to share back the modifications if you like. But first, would you be willing to put up a clear license, preferably something like MIT: https://choosealicense.com/licenses/mit/#suggest-this-license
Cheers!
Greetings Clinton,
I had plans & ideas to work on performance of the procedure trying out with delayed / bulk inserts. I'm fairly interested to know your changes leading improvements. Please share the fork/pull request. I added the MIT License.
Regards.
I'd like to help this issue . I think ,if someone need lots of rows , it's more efficiently inert 1000 rows in one loop instead of insert one by one
With encouragement from @kartist I have updated the script. Please review again.
@kedarvj
MariaDB [db]> call populate('db', 'table', 1000000, 'N');
+---------------------+
| Developed by |
+---------------------+
| Kedar Vaijanapurkar |
+---------------------+
1 row in set (1 hour 34 min 8.535 sec)
Query OK, 1001999 rows affected (1 hour 34 min 8.539 sec)