1

I have a database and that contain many tables , but all of them store text and full tables size is less than 10 MB , but the database file on server have larger than 1 GB

The tables uses MyIASM , where is the problem ?

thanks

Ata
  • 12,126
  • 19
  • 63
  • 97
  • Which database file? is it ibdata1? Do you have any InnoDB tables? Did you have any such tables before and have you deleted them? If so, have a look here: http://stackoverflow.com/questions/3456159/how-to-shrink-purge-ibdata1-file-in-mysql – Jeremy Smyth Aug 29 '13 at 10:03
  • @Ata maybe you should look if you can keep the TEXT datatype in one table. table fragmentation is caused by deleting/updating from table that have non fixed sizes like varchar / text columns. – Raymond Nijland Sep 20 '13 at 18:36

1 Answers1

2

You can use OPTIMIZE TABLE for reducing disk usage on MyISAM tables (usually after deleting lot of data from them or doing major changes in structure).

For InnoDB, that is quite more challenging, see Howto: Clean a mysql InnoDB storage engine?

Community
  • 1
  • 1
Michal Čihař
  • 9,799
  • 6
  • 49
  • 87