#24203: Optimisation: adding multiple fields to same model should attempt to run
single ALTER TABLE statement
-------------------------------------+-------------------------------------
Reporter: peterlauri | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: migration | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by adamchainz):
+1
I spend a large amount of time rewriting the SQL output from django
migrations to combine the ALTER TABLE statements for each table into one,
just so they can pass on our production database (MySQL, 30GB, hundreds of
millions of rows).
Actually I normally use [http://www.percona.com/doc/percona-toolkit/2.2
/pt-online-schema-change.html pt-online-schema-change] for tables of any
size, since it's 0 downtime, but it's still a pain to rewrite all the SQL
into a single ALTER.
--
Ticket URL: <https://code.djangoproject.com/ticket/24203#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.6a0371d11489af3c941df3aee3c738a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.