Skip to content

Mysql data can be 10x faster #48

@cscortes

Description

@cscortes

Hi, love this database, but I noticed that it was taking way too long to load the data in mysql.
I know that an external fix would be to set autocommit = 0, but most people aren't thinking about this when then just try to import the database. A transparent fix is to place the sql in sql-fundamentals/sql/northwind_data.sql in a transaction like so:

START TRANSACTION;
...
All the insert statements ....
...
COMMIT;

That caused that all of the 600 000 statements in the data file to import in a minute or 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions