One of my favourite topics in MySQL performance talks is the
ambiguous description of what size of what your transactions
should be. The basic advice is:
Running InnoDB in autocommit, or with short transactions will
cause many more fsync()'s which will reduce your write
performance.
It seems that if I run entirely transaction-less the import speed
of a test I wrote is:
real 0m31.222s user 0m2.111s sys 0m1.070s real 0m30.318s user 0m2.111s sys 0m1.070s real 0m31.744s user 0m2.108s sys 0m1.078s
If I run in transactional, committing after approx 10 queries,
the time is awesomely better:
real 0m12.154s user 0m1.771s sys 0m0.869s real 0m11.976s user 0m1.773s sys 0m0.874s real 0m12.827s user 0m1.768s sys 0m0.872s
I tried hacking my code to commit even less frequently, and I can
get …