I just need a simple python script to insert a records into my database. Currently i am using a php. But it takes more time. Because i have huge data.
So, i like to try with python script. But i dont have much hands on experience in python. So, i need all your help.
A python script which can be compiled on linux via "make" "make install" which will create a binary that can import a csv into mysql from parameters.
/usr/bin/importer -db_name "my_database_name" -db_user "username" -db_passsword "password" -db_fields "title,description,contents,etc" -csv_fields "0,1,2,3" -input "/path/to/csv.csv"
The csv_field numbers represents the column in the csv (such as 0 is the first column, 1 is the 2nd column etc) and matches to the fields (0 csv field imports into 'title', 1 imports into 'description', etc).
If any possible solution to make this insertion faster, i can go for that also. I have nearly 10 million records in csv file.