How to migrate a CSV file to Sqlite3 (or MySQL)? - Python
Question: I'm using Python in order to save the data row by row... but this is extremely
slow!

**The CSV contains _70million lines_ , and with my script _I can just store
1thousand a second_.**

* * *

This is what my script looks like

    
    
    reader = csv.reader(open('test_results.csv', 'r'))
    for row in reader:
        TestResult(type=row[0], name=row[1], result=row[2]).save()
    

* * *

I reckon that for testing I might have to consider MySQL or PostgreSQL.

**Any idea or tips? This is the first time I deal with such massive volumes of
data. :)**


Answer: For MySQL imports:

    
    
    mysqlimport [options] db_name textfile1 [textfile2 ...]
    

For SQLite3 imports:

ref <http://stackoverflow.com/questions/1045910/how-can-i-import-load-a-sql-
or-csv-file-into-sqlite>

