CrazyEngineers
  • Speed up import of mysql database with this simple trick

    Kaustubh Katdare

    Kaustubh Katdare

    @thebigk
    Updated: Oct 26, 2024
    Views: 1.1K
    I was doing a trial run of importing a moderately big database on my local machine and it was taking almost forever. I found out this tip by someone that worked like charm. Try this out

    mysql> use db_name;
    
    mysql> SET autocommit=0 ; source the_sql_file.sql ; COMMIT ;
    It not only showed me what's happening, but also did a world of difference to the speed of import!

    PS: I'm not into databases and not sure what magic does autocommit=0 does. Would love if someone can explain in easy to understand words.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Ramani Aswath

    MemberFeb 4, 2018

    It is very simple. To me autocommit = 0 means I know damn all about it. The only database Software I ever used was the ancient dbase II.
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorFeb 4, 2018

    Only had heard about the dBase II. Looks like they share similar syntax.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register