drush migrate:import --sync and performance

Created on 11 July 2023, about 1 year ago
Updated 4 August 2023, about 1 year ago

Problem/Motivation

* I have around 20 migrations that import blocks, nodes, paragraphs, and taxonomy terms.
* When I run the migrations on Acquia, the disk space usage goes up due to the number of write-queries that are executed by "drush mim --sync". Removing the --sync option fixes this though, i.e. way lesser queries.
* Most of these queries are for the key_value table (state).
* Additionally, when I run all the migrations one by one with --sync, they run faster than if I run them all with --all --sync.

drush mim {migration.id} --sync: 3m8.960s
drush --all --sync: 8m31.586s

These figures are for running all migrations with no changes, i.e. no create, update, or rollbacks caused by the execution of both the commands.

Steps to reproduce

* Run "drush mim --all --sync" and observe the number of UPDATE, DELETE, and INSERT queries that are executed.
** You can do so with "SET global log_output = 'table'; SET global general_log = on;" and then watching the "mysql.general_log" table.
* Run "drush mim {migration.id} --sync" on all migrations one by one and see that it finishes faster than when using "--all"

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Closed: duplicate

Version

5.0

Component

Code

Created by

🇨🇦Canada jigarius Montréal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024