Off topic:Inserting millions of records into MySQL database using Python
0
0
Entering edit mode
8.8 years ago
Prasad ▴ 50

Hi,

I have a txt file with about 100 million records (numbers). I am reading this file in Python and inserting it to MySQL database using simple insert statement from python. But its taking very long and looks like the script wouldn't ever finish. What would be the optimal way to carry out this process? The script is using less than 12% of memory and 10 to 15% of CPU.

Any suggestions to handle such large data and insert it efficiently into database, would be greatly appreciated.

Thanks

mysql python • 4.1k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 1431 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6