Ticket #497 (closed defect: invalid)
Performance degrades when running two migrations in the same step
|Reported by:||egmanoj@…||Owned by:||andrew|
My application has two migrations. The first one is an auto generated migration to add a column to a table. The second one is a custom data migration that updates the values of the newly added column. I'll call them migration 0007 and migration 0008 respectively.
When I run them separately using two commands, i.e.
python ./manage.py migrate app 0007 # done. # followed by python ./manage.py migrate app 0008
it takes about ~20 seconds to complete both of them.
However when I run them in one go, i.e.
python ./manage.py migrate
it never completes. Migration 0007 completes and 0008 starts but the latter never completes.
top revealed that postgres was taking up >90% of the CPU when the second option was tried.
The table in question has a little less than 50,000 (fifty thousand) rows. I am running Postgresql 8.3, Django 1.2 and South 0.7.1 on an Ubuntu Jaunty machine.