Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15753

Making migration less time consuming

XMLWordPrintable

      The migration process from previous version (3.0.14 for me) to 3.2.2 is very time consuming on large databases.
      For example, the only \phpbb\db\migration\data\v320\default_data_type_ids step, in my case, needs not less than about 1700 seconds (I made it several time because I am trying several migration rehearsals on a backup server before doing the real one) using an Intel Core 2 Duo processor.
      This is so long that I tried to spy the mysql process during this step (using "show processlist;" from another connection).
      I found that during this time, there was nearly only "ALTER TABLE" statements for single columns, very often several times for the same table.
      This kind of statement implies recopying the whole table on a temporary file while making the change.
      Each time.
      In MySQL, the syntax of the ALTER TABLE statement allows grouping multiple changes on the same table into a single statement.
      Such grouping would need only one table recopy for all changes instead of as many table recopies as there are changes for a given table.
      The [prefix]_search_wordmatch table is especially hard on this.
      Would it be possible to modify the migration process in order to minimize the number of ALTER TABLE statements that way?

            Unassigned Unassigned
            Gingko Gingko [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: