List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 11 1999 10:07pm
Subject:Re: Symlinked tables and OPTIMIZE TABLE.
View as plain text  
At 2:59 PM -0700 7/11/1999, Scott Hess wrote:
>[On FreeBSD3.1, with MYSQL 3.22.23.]
>Empirical testing and the documentation both indicate that if I use symlinks
>to move the table.ISD, table.ISM, and table.frm files to a different
>filesystem, queries and updates and the like work fine.
>Unfortunately, when I do an OPTIMIZE TABLE on the table in question, it
>attempts to create the temporary table in the filesystem the database
>directory is on (ie, the filesystem the symlink is in, as opposed to the
>filesystem the symlink is _to_).  This is pretty nasty, given that we want
>to move the tables in question to the other filesystem so that their I/O
>needs don't dominate the requests being made to other tables in the
>database!  Worse, after OPTIMIZE TABLE completes, it removes the symlinks
>and replaces them with the optimized tables.
>Am I missing something?

No, and the same thing will happen with ALTER TABLE.

Do *NOT* use symlinks to relocate tables.

You could put the tables in a separate database and symlink the
database directory, on the other hand.  But symlinking tables is
a bad idea.

Paul DuBois, paul@stripped
Northern League Chronicles:
Symlinked tables and OPTIMIZE TABLE.Scott Hess12 Jul
  • Re: Symlinked tables and OPTIMIZE TABLE.Paul DuBois12 Jul
  • Re: Symlinked tables and OPTIMIZE TABLE.Benjamin Pflugmann12 Jul