Just to jot it down lest I forget:
Tar’ing the local directory and streaming the tarball straight to gzip:
tar cvf - . | gzip > target.tar.gz
MySQLdump’ing directly to gzip: (more…)
Just to jot it down lest I forget:
Tar’ing the local directory and streaming the tarball straight to gzip:
tar cvf - . | gzip > target.tar.gz
MySQLdump’ing directly to gzip: (more…)
There are a lot of words about the MySQL upgrade on Ubuntu 10.04 (64 bit specifically, perhaps the 32bit version too?) — it just hangs:
You get the hopeful message:
Preparing to replace mysql-server-5.1 5.1.41-3ubuntu12.1
but then nothing happens and everything just hangs. (more…)
Just to have them all in one place, and for posterity’s sake, I’ve pulled together some points on how to optimise your MySQL programming.
First off, the result of Session 1 of MySQL Camp 1:
- Use EXPLAIN to profile the query execution plan
- Use Slow Query Log (always have it on!)
- Don’t use DISTINCT when you have or could use GROUP BY
- Insert performance
- Batch INSERT and REPLACE
- Use LOAD DATA instead of INSERT
- LIMIT m,n may not be as fast as it sounds
- Don’t use ORDER BY RAND() if you have > ~2K records (more…)