APixel Visuals
APixel Visuals

Reputation: 1648

MySQL/PHPMyAdmin - Importing 15,000 rows with 512MB of RAM

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

Answers (2)

Sherry
Sherry

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

David Wayne Griffith
David Wayne Griffith

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

Related Questions