> I am using django+MySql.
> My job involves to write a huge number of products codes into the
> MySql, code such as: ABCDEFGHI10, it is typically between 1 million up
> to 50 million codes within 1 file, which need to be uploaded/
> downloaded into MySql.
> 
> The problem for this is it takestoo much time to insert data into the
> database, a typical 10 million code file will take 3 hours at least to

Once you start dealing with such large volumes of data, you'll 
want to look into database-specific commands for bulk-loading 
(and later dumping) data.  In the case of MySQL, you'll want to 
use the LOAD DATA[1] command.  I believe it needs to be executed 
locally on the server (or at least the data-file needs to be 
local to the server)  unless overridden by the LOCAL keyword 
(read the docs to learn more) which may or may not be supported 
by the Python MySQL driver.

-tim


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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to