MySQL Table Overhead

  • Avinash
  • 5
  • Oct 07, 2011
  • Database

If you are familier with the PhpMyAdmin then you might have seen the column overhead in the table listing page. So what is this table overhead?

So I am trying to explain this in very simple way as much I can:

Whenever you delete rows from the MySQL tables, it creates a unoccupied space in the table. MySQL will remember this unoccupied space and it will use this space when there is INSERT operation on database.

MySQL have to remember this empty space even though it have no data stored. :)

Note: MySQL table overhead is actual size of a table datafile relative to the ideal size of the same datafile.

MySQL Table Over Head

Any problem with Table Overhead?

There will not be any problem if overhead is in smaller size. But it is recommended to remove this overhead if its in larger size.

How to remove Table Overhead?

We can optimize the table to remove the table overhead.

OPTIMIZE table table_name;
  OPTIMIZE table table_name;

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by:

  • http://www.teamnirvana.com/blog Suneel

    Nice tip there Avinash. Will check my backend once for this :)

  • http://www.softway.com.sa Mohamad Sibai

    Thanks Avinash,

    As far as I know this is applied for MyISAM not InnoDB.

    BR

    • http://www.xpertdeveloper.com Avinash

      Hi Mohamad Sibai,

      You are right… :)

  • http://tameshc.com hosein

    hi, thank you for this article, i see overhead on my db

    shouldnt worry about remove my data with OPTIMIZE command?

  • Pingback: Overhead mysql | Luxrewards