Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6334049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:35:04+00:00 2026-05-24T18:35:04+00:00

Questions : 1 – What is mean by Overhead? When I click Optimize table

  • 0

enter image description here

Questions :

1 – What is mean by Overhead? When I click “Optimize table” button on MyISAM table, Overhead and Effective data are gone. I wonder what it does to my table?

2 – Do I need to care of Overhead and Effective value actually? How to fix the Overhead and Effective problem on InnoDB table?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:35:04+00:00Added an answer on May 24, 2026 at 6:35 pm

    Fixing InnoDB is not as trivial as a Click of a Button. MyISAM is.

    Under the hood, OPTIMIZE TABLE will do this to a MyISAM table called mytb:

    • Create empty temp table with same structure as mytb
    • Copy MyISAM data from mytb into the temp table
    • Drop table mytb
    • Rename temp table to mytb
    • Run ANALYZE TABLE against mytb and store index statistics

    OPTMIZE TABLE does not work that way with InnoDB for two major reasons:

    REASON #1 : InnoDB Storage Layout

    By default, InnoDB has innodb_file_per_table disabled. Everything InnoDB and its grandmother lands in ibdata1. Running OPTIMIZE TABLE does the following to an InnoDB table called mytb:

    • Create empty InnoDB temp table with same structure as mytb
    • Copy InnoDB data from mytb into the temp table
    • Drop table mytb
    • Rename temp table to mytb
    • Run ANALYZE TABLE against mytb and store index statistics

    Unfortunately, the temp table used for shrinking mytb is appended to ibdata1. INSTANT GROWTH FOR ibdata1 !!! In light of this, ibdata1 will never shrink. To matters worse, ANALYZE TABLE is useless (Explained in REASON #2)

    If you have innodb_file_per_table enabled, the first four(4) steps will work since the data is not stored in ibdata1, but in an external tablespace file called mytb.ibd. That can shrink.

    REASON #2 : Index Statistics are Always Recomputed

    InnoDB does not effectively store index statistics. In fact, if you run ANALYZE TABLE on mytb, statistics are created and stored. Unfortunately, by design, InnoDB will dive into the BTREE pages of its indexes, guessimate key cardinalities, and uses those numbers to prep the MySQL Query Optimizer. This is an on-going process. In effect, ANALYZE TABLE is useless because the index statistics calculated are overwritten with each query executed against that table. I wrote about this in the DBA StackExchange June 21, 2011.

    Percona explained this thoroughly in http://www.mysqlperformanceblog.com

    As for overhead in MyISAM, that number can be figured out.

    For a MyISAM table, the overhead represents internal fragmentation. This is quite common in a table that experiences, INSERT, UPDATEs, and DELETEs, especially if you have BLOB data or VARCHAR columns. Running OPTIMIZE TABLE make such fragmentation disappear by copying to a temp table (naturally not copying empty space).

    Going back to InnoDB, how do you effectively eliminate waste space ? You need to rearchitect ibdata1 to hold less info. Withing ibdata1 you have four types of data:

    • Table Data Pages
    • Index Data Pages
    • Table MetaData
    • MVCC Data for Transactions

    You can permamnently move Table and Indexes Out of ibdata1 forever. What about data and indexes already housed in ibdata1 ?

    Follow the InnoDB Cleanup Plan that I posted October 29, 2010 : Howto: Clean a mysql InnoDB storage engine?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Questions : What does the kernel do if you stick a shell-script into the
Two questions: Can someone point me to unbiased data that compares .NET performance to
2 questions: Does using MVC make it any easier to build 508/WAI compliant sites?
Questions needing answers : Does the finalizer of the client side ServicedComponent call ServicedComponent.DisposeObject
Questions Should the Data Access Layer (DAL) and Business Logic Layer (BLL) be exposed
Two questions here. My view has a close button that when clicked, the window
Two questions: If I remove all the data inside a collection (db.mycollection.remove({})) will the
Questions about Making reflection fly and exploring delegates ... If I need to create
Two questions: Does LaTeX allow one to (re)define commands within a \newenvironment ? I've
My questions is, Why would a language designer consider allowing comparison between different data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.