Skip to content

Improve MySQL Import #709

@perdelt

Description

@perdelt
-- === VOR dem Import ===
SET GLOBAL autocommit = 0;
SET GLOBAL foreign_key_checks = 0;
SET GLOBAL unique_checks = 0;
SET GLOBAL innodb_flush_log_at_trx_commit = 2;
SET GLOBAL innodb_io_capacity = 2000;
SET GLOBAL innodb_io_capacity_max = 10000;
SET GLOBAL innodb_ddl_threads = 8;
SET GLOBAL innodb_parallel_read_threads = 8;

-- === Import ===
LOAD DATA INFILE '...' INTO TABLE lineitem ...;
COMMIT;

-- === NACH dem Import ===
SET GLOBAL autocommit = 1;
SET GLOBAL foreign_key_checks = 1;
SET GLOBAL unique_checks = 1;
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
SET GLOBAL innodb_io_capacity = 200;        -- zurück auf Default
SET GLOBAL innodb_io_capacity_max = 2000;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions