I am doing some image processing, specifically making thumbnails. After thumbnails are complete, I update a field in my database image table:
Image.objects.filter(file_name__in=images).update(thumbnailed=True)
The table has gotten to be a medium size (about 2 million records) and I started getting the following error:
Lock wait timeout exceeded; try restarting transaction
In looking for a solution, I came across this thread:
It has some good ideas including increasing the timeout config setting.
Is there a way to more efficiently run this update from Django that would not require changes to the database configuration?