SET
Syntax
We start with the system level things since some of these decisions have to be made very early. In other cases a fast look at this part may suffice because it not that important for the big gains. However, it is always nice to have a feeling about how much one could gain by changing things at this level.
The default OS to use is really important! To get the most use of multiple-CPU machines one should use Solaris (because the threads works really nice) or Linux (because the 2.2 kernel has really good SMP support). Also on 32-bit machines Linux has a 2G file-size limit by default. Hopefully this will be fixed soon when new filesystems are released (XFS/Reiserfs). If you have a desperate need for files bigger than 2G on Linux-intel 32 bit, you should get the LFS patch for the ext2 filesystem.
Because we have not run MySQL in production on that many platforms, we advice you to test your intended platform before choosing it, if possible.
--skip-external-locking
MySQL option to avoid external
locking. Note that this will not impact MySQL's functionality as
long as you only run one server. Just remember to take down the server (or
lock relevant parts) before you run myisamchk
. On some system
this switch is mandatory because the external locking does not work in any
case.
The --skip-external-locking
option is on by default when compiling with
MIT-pthreads, because flock()
isn't fully supported by
MIT-pthreads on all platforms. It's also on default for Linux
as Linux file locking are not yet safe.
The only case when you can't use --skip-external-locking
is if you run
multiple MySQL servers (not clients) on the same data,
or run myisamchk
on the table without first flushing and locking
the mysqld
server tables first.
You can still use LOCK TABLES
/UNLOCK TABLES
even if you
are using --skip-external-locking