Speed up import of mysql database with this simple trick

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.

Replies

  • Ramani Aswath
    Ramani Aswath
    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.
  • Kaustubh Katdare
    Kaustubh Katdare
    Only had heard about the dBase II. Looks like they share similar syntax.

You are reading an archived discussion.

Related Posts

Dear CEans, It's been a while we posted any update on what's happening behind the scenes at CrazyEngineers. We've been working on the next version of CrazyEngineers and as we...
The science-fiction vision of robotic prosthetic limbs that can be controlled by the brain and provide sensory feedback is coming closer. Stuart Nathan looks at progress in the UK. Future...
NIST scientists have built a flowmeter that can track flows of a billionth of a liter per minute in real time. Researchers Build a Microfluidic Flowmeter
I am a mechanical engineering student at the University of Waterloo on the student design team Waterloo Formula Electric SAE. I'm designing a sprocket for a rear half shaft on...
Im a mechanical final year student and after completing my b-tech , im looking forward to take NEBOSH certificate in safety. I just want to know **what are the areas...