Inspired by Baron’s earlier post, here is one I hear quite frequently -
“If you enable innodb_file_per_table, each table is it’s own .ibd file.Â You can then relocate the heavy hit tables to a different location and create symlinks to the original location.”
There are a few things wrong with this advice:
- InnoDB does not support these symlinks.Â If you run an ALTER TABLE command, what you will find is that a new temporary table is created (in the original location!), the symlink is destroyed, and the temporary table is renamed.Â Your “optimization” is lost.
- Striping (with RAID) is usually a far better optimization.Â Striping a table across multiple disks effectively balances theÂ ‘heavy hit’ access across many more disks.Â With 1 disk/table you are more likely to have the unbalance one disk overloaded, and many idle.
- You restrict your backup methods.Â You can’t LVM snapshot across logical volumes.
Another common claim with this recommendation is that it allows you to quickly add space when running out.Â LVM actually allows you to add physical volumes, and increase the size of logical volumes ;)Â This is much easier to do than more one large table around.