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.
Entry posted by Morgan Tocker |
22 comments