If you use mysql's innodb table engine, you might find it useful to
innodb_file_per_table option to your my.cnf file
(under the [mysqld] section). This will create each innodb table in
its own file/tablespace instead of putting everything in the
ibdata file, thus making it easier for you to run
optimize table faster. However, this option only affects new
tables. Old tables would still live in the shared ibdata file.