Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow? It seems to only insert about 400 rows per second. #6

Open
cbegin opened this issue Nov 30, 2018 · 5 comments
Open

Slow? It seems to only insert about 400 rows per second. #6

cbegin opened this issue Nov 30, 2018 · 5 comments

Comments

@cbegin
Copy link

cbegin commented Nov 30, 2018

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?

@cbegin
Copy link
Author

cbegin commented Dec 4, 2018

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!

@kedarvj
Copy link
Owner

kedarvj commented Dec 4, 2018

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.

@kartist
Copy link

kartist commented Apr 29, 2021

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

@kedarvj
Copy link
Owner

kedarvj commented May 2, 2021

With encouragement from @kartist I have updated the script. Please review again.

@jetrodn
Copy link

jetrodn commented Oct 28, 2021

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants