Thanks everybody for your answers

well, I've tried the solutions you've proposed and I've tested them on a
part of my import procedure on my dev machine
previously, this part was taking about 12 minute to complete

-Justin & Rajesh
my tables are MyIsam. I've read Django documentation on transaction
commitment, even though this topic is not 100% clear for me, I've tried to
do as you suggested, using commit_on_success and commit_manually (I don't
know if it works on MyIsam tables) but there was either no improvement,
either a loss of speed
-Ivan
I've tried commenting dispatcher.send() calls in both save and __init__
original methods. Well, I was expecting some kind of improvement, but
somehow it takes almost exactly the same time to complete the job. I think
that the problem stands on the 'database side' of Django
- Matt
I can tell that my CPU works quite a lot during the execution of these
procedures, and mysql engine uses about 70%; maybe you have a lot of disk
access?
So far,
as Ivan and Johan were suggesting, I've tried to transfer data from the
original DB to my Django DB using raw SQL instructions and there was a
considerable increase in speed. I've tested it only on some transactions but
it saved about 40-60% of time, I'd say.

Well, I didn't want to come to that ;) but obviously bypassing the Django
machinery and letting MySQL do the job is the fastest solution.
Thanks again,

Alex
-- 
View this message in context: 
http://www.nabble.com/how-to-speed-up-objects-saving-tp15222255p15288461.html
Sent from the django-users mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to