MySQL – When an Optimize Fails
When using the MyISAM engine, you may need to run an “optimize”
to regain space and increase performance. What do you need
to know BEFORE you start the “optimize” command.
The first thing to know is the “optimize” creates a Temporary
file in the database datadir, (see mr.TMD). The problem is
there is only 16GB of free space with the mr.MYD and mr.MYI are
almost 40GB. There is one more thing you need to
know. MySQL uses tmpdir at the end of the “optimize” which
can be a problem if there is not enough space.
SERVER1:/db/mysql/data/stats>ls -lt kh*
-rw-rw---- 1 pm pmapp 18163175424 Mar
23 …