Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Very large databases can take a long time to load, in part because indexes are regenerated after each insert, which is useless when simply loading a database dump, as happens when provision clones or migrates a site.
By default mysqldump is already using the options unique_checks=0, foreign_key_checks=0, and disable keys (although the latter has no effect on InnoDB tables, the D7 default). But we should add --no-autocommit, which wraps each table as follows:
set autocommit=0;
INSERT ...
INSERT ...
INSERT ...
commit;
Assigning version 7.x-3.x, but backport to 6.x-2.x should be trivial.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | add_no_autocommit-2372653-1.patch | 1.26 KB | helmo |











Comments
Comment #1
helmo CreditAttribution: helmo commentedComment #2
mvcComment #5
omega8cc CreditAttribution: omega8cc commentedComment #6
omega8cc CreditAttribution: omega8cc commented