Eric Frazier wrote:
Andrew Carlson wrote:
If you do what Baron suggests, you may want to set Innodb to create a
file-per-table - that way, in the future, you could save space when tables are dropped, or you could recreate innodb tables individually to save space,
not have to dump all your innodb tables at one time.

I think this is a fantastic idea. So you would

- do your DB dump(horrible with hundreds of Gigs.)
- reset your my.cnf setting to include:

[mysqld]
innodb_file_per_table

- stop the db

- kill off the existing tablespace files

- restart the DB

- recreate the database and import your dump.

http://dev.mysql.com/doc/refman/5.0/en/multiple-tablespaces.html

So the only other question is what is the cost if any? It is a good idea because often there are just a few tables that get really big and this is a nice way to deal with them separately like you would with MyISAM.

You still can't get rid of the shared tablespace file completely; the separate tablespace files hold only the data and indexes. InnoDB stores the data dictionary, rollback segment etc in the main tablespace.

Another cost is external fragmentation as opposed to internal. Admittedly, I do like file-per-table better. It's just not 100% upside.

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to