views:

114

answers:

3

This might sound dumb but yeah i need a effective way of doing this. Am using php at the moment and man it is slow.

Any pointers please.

Cheers.

+4  A: 

Anytime I have to insert massive amounts of data, I try to use "LOAD DATA INFILE":

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

The bottleneck could also be the indexing of the data. I would recommend disabling indexing prior to running the load data infile and then enabling it afterward.

malonso
Thanks for the quick reply. I will try and let you know.
jeeves
A: 

I like HediSQL http://www.heidisql.com/. I have moved databases with over a million rows using it. There is an import an export feature that works quite well. It's a great mysql client and makes working with mysql much easier than using phpMyAdmin.

digitalbart
Yeah have been using heidisql too. But this problem required to be solved using web based interface as we are programming an admin ui for a transportation quote system. Thanks for the reply.
jeeves
A: 

One thing to try is deleting any indexes before you do the insert. Once you have inserted everything create the indexes again.

MySql actually has a really good article on this and other methods. Take a look at it here.

Abe Miessler
thanks for the heads up.
jeeves