Changes between Version 1 and Version 2 of Ticket #37416, comment 1


Ignore:
Timestamp:
Oct 11, 2026, 4:20:50 AM (75 minutes ago)
Author:
Gavin Wahl

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37416, comment 1

    v1 v2  
    66Does anyone have an opinion which would be preferable?
    77
    8 There's also currently a performance impact of recording migrations outside a transaction. I have a squashed migration that `replaces=[...]` several hundred others. `record_migration` inserts a `django_migrations` row for each of those replacements. It's taking about 0.6s to record all of them applied, because the each get their own transaction. In a single transaction, it takes about 0.01s.
     8There's also currently a performance impact of recording migrations outside a transaction. I have a squashed migration that `replaces=[...]` several hundred others. `record_migration` inserts a `django_migrations` row for each of those replacements. It's taking about 0.6s to record all of them applied, because the each get their own transaction. In a single transaction, it takes about 0.01s. I'm working on making my tests run faster, and since they migration from scratch every time that's actually a significant part of time to migrate--slower than even the combine DDL time of all the migrations.
Back to Top