Reputation: 1648
I'm trying to import 15,000 rows of data into my MySQL database. I know exactly how I would do this normally, but I have a constraint. 512MB of RAM... What's the most efficient way of doing this? Is there any way for MySQL to automatically import at a slower rate that way it doesn't crash due to not enough memory? Also, note that I'm using PHPMyAdmin. Thanks!
Upvotes: 0
Views: 364
Reputation: 189
How big of each row? If 1k(which is already very big) each row, 15000 rows only 15M, I don't think this will be a problem. If you really worry about it, just insert one row each time, don't use a bulk insert.
Upvotes: 1
Reputation: 29
My guess is you are using a VPS on something like Digital Ocean? If so then you can create a swap file: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
or look around for how to create a swap file for your os / vps.
Hope that helps. Cheers
Upvotes: 0