increase insertion speed in python
I have a script in django which i am running on terminal to update the
field values in database , there is about 3000 records to be updated , it
updated but it takes so much time.
Here is the code:
getAge = myplayer.objects.all()
for i in getAge:
i.age = i.age + 0.0192 # it is equilant to 1/52
i.save()
print "new age of id - " ,i.id, "is ", i.age
I am using a MYSQL DB please suggest how can i speed up the insertion time
thanks
No comments:
Post a Comment