List:General Discussion« Previous MessageNext Message »
From:Brent Clark Date:March 26 2010 11:22pm
Subject:Freespace threshold be having to OPTIMIZE TABLE?
View as plain text  

My query below, looks for tables with 10% freespace but also the space 
is greater than 100K.

mysql> SHOW TABLE STATUS WHERE Data_free / Data_length > 0.1 AND 
Data_free > 102400 \G;
*************************** 1. row ***************************
            Name: bayes_words
          Engine: MyISAM
         Version: 10
      Row_format: Dynamic
            Rows: 97134
  Avg_row_length: 27
     Data_length: 2960488
Max_data_length: 281474976710655
    Index_length: 4182016
       Data_free: 330136
  Auto_increment: NULL
     Create_time: 2010-02-21 05:17:26
     Update_time: 2010-03-27 01:12:01
      Check_time: 2010-02-21 05:17:27
       Collation: latin1_swedish_ci
        Checksum: NULL
1 row in set (0.01 sec)

Question I would like to ask is, what is an acceptable "threshhold" or 
amount of freespace before I must run OPTIMIZE TABLE?

Kind Regards
Brent Clark

Freespace threshold be having to OPTIMIZE TABLE?Brent Clark27 Mar