I work in a company that has a large database and I want to perform some update queries on it but it seems to cause a huge memory leak the query is as follow
c= CallLog.objects.all()
for i in c:
i.cdate = pytz.utc.localize(datetime.datetime.strptime(i.fixed_date, "%y-%m-%d %H:%M"))
i.save()
I wrote this in the interactive shell of Django
I even tried to use
with transaction.atomic()
but it didn't work, do you have any idea how can I detect the source of
the dataset I am working on is about 27 million
fixed_date is a calculated property