[Tutor] Handling hundreds of thousands of inserts with MySQLdb

Gonzillaaa gonzillaaa at gmail.com
Mon Sep 4 10:45:08 CEST 2006


Kent I realised after I asked how silly it was to try to "silence"  
Python. Is just bad habits picked up from php, I fixed the schema and  
now is all fine.

Karl you're absolutely right "LOAD DATA INFILE" works flawlessly and  
is a lot faster. it seems  I was using the wrong tool for the job a  
quick shell script now does the same thing with a lot less effort,  
Python is still doing a great job at cleaning the file though ;)

Thank you both for your help.

Gonzalo.

On 3 Sep 2006, at 12:52, Kent Johnson wrote:

> Rather than silence the warnings I would fix the data. You could  
> process
> each row in your returnTuple() function. Alternately you could perhaps
> change your database table to allow the data.
>
> Kent
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list