title: optimizing Innodb table to release free space
body: <p>I am unable to free space in innodb tables.</p>
  
  <p>I also set the <strong>innodb_files_per_table=1</strong> so each table has separate ibd file.</p>
  
  <p>When i query the information_Schema for checking the data size, index size and data_free, it always show some value like 7Mb in data_free column for some tables. Query :</p>
  
  <blockquote>
    <p>SELECT table_schema "Data Base Name",  table_name,  (data_length +
    index_length) / 1024 / 1024 "Data Base Size in MB", ( data_free )/
    1024 / 1024 "Free Space in MB"  FROM information_schema.TABLES  where
    table_schema='DB_NAME'  order by 4 desc limit 30;</p>
  </blockquote>
  
  <p>I run the optimize table, also tried <strong>alter table table_name engine='innodb'</strong> but the data_free is still showing 7Mb.</p>
  
  <p>I also enable the <strong>innodb_stats_on_metadata</strong> to refresh the stats and also do flush tables and reopen the table but still showing 7Mb in data_free.</p>
  
  <p>Any idea how i get this free space issue resolved ?</p>