Home » Performance » MySQL » Reduce InnoDB Table Space
Reduce InnoDB Table Space [message #3268] Wed, 09 July 2008 19:09 Go to next message
Speeple  is currently offline Speeple
Messages: 91
Registered: August 2006
Member
I recently changed to a per-table file for InnoDB.

The problem now is I'm left over with a 70Gb old table space file which used to singularly hold the entire database.

Is there a way of reducing the size without harming the data?

I've tried moving the log files and old table space so that MySQL recreates them, but then the individual tables are lost via this process so I must revert to the old files.

I guess a full backup and re-insert will rectify the problem but that's a process that takes more time than I want.

Cheers!


Martin Gallagher | Speeple: The latest news
Re: Reduce InnoDB Table Space [message #3273 is a reply to message #3268 ] Fri, 11 July 2008 15:52 Go to previous messageGo to next message
erkules  is currently offline erkules
Messages: 58
Registered: December 2007
Member
With innodb_file_per_table you still need the tablespace!
http://dev.mysql.com/doc/refman/5.0/en/multiple-tablespaces. html:
#v+
Note

InnoDB always needs the shared tablespace because it puts its internal data dictionary and undo logs there. The .ibd files are not sufficient for InnoDB to operate.

#v-

You cant reduce the tablespace. Go for dumping and reinstalling:-)
Re: Reduce InnoDB Table Space [message #3278 is a reply to message #3273 ] Fri, 11 July 2008 16:37 Go to previous messageGo to next message
Speeple  is currently offline Speeple
Messages: 91
Registered: August 2006
Member
I understand the central table space needs to exist, but being 75Gb means it contains all of the old data which is now in separate files.

I did do a backup etc. now the default table space is 50Mb.


Martin Gallagher | Speeple: The latest news
Re: Reduce InnoDB Table Space [message #3279 is a reply to message #3278 ] Fri, 11 July 2008 16:47 Go to previous messageGo to next message
erkules  is currently offline erkules
Messages: 58
Registered: December 2007
Member
You cant reduce the tablespace. thats why they have nnodb_file_per_table.
Re: Reduce InnoDB Table Space [message #3280 is a reply to message #3279 ] Fri, 11 July 2008 18:32 Go to previous message
Speeple  is currently offline Speeple
Messages: 91
Registered: August 2006
Member
What I mean is data was moved from a single table space to per file per table.

This means there was a lot of empty space in the 75Gb old single table space. There is no vacuum or such function, so a dump and re-insert rectified the space issue.


Martin Gallagher | Speeple: The latest news
Previous Topic:What can cause queries to block on 'opening tables'?
Next Topic:MySQL 4.1.13: replication and myisampack
Goto Forum:
  



Current Time: Fri Nov 21 02:05:18 EST 2008

Total time taken to generate the page: 0.02888 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge