GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Reduce InnoDB Table Space

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reduce InnoDB Table Space

    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!

  • #2
    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:-)

    Comment


    • #3
      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.

      Comment


      • #4
        You cant reduce the tablespace. thats why they have nnodb_file_per_table.

        Comment


        • #5
          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.

          Comment

          Working...
          X