]> git.mxchange.org Git - friendica.git/commitdiff
The table optimisation level calculation is now using the index size as well
authorMichael Vogel <icarus@dabo.de>
Fri, 11 Mar 2016 19:32:22 +0000 (20:32 +0100)
committerMichael Vogel <icarus@dabo.de>
Fri, 11 Mar 2016 19:32:22 +0000 (20:32 +0100)
include/cron.php

index d68bd7f0845eca4c43b9ad6e3091efcbb14d5090..db7d44be0b9c583cccef8be4b99090b88cf433a1 100644 (file)
@@ -357,7 +357,7 @@ function cron_clear_cache(&$a) {
                        continue;
 
                // Calculate fragmentation
                        continue;
 
                // Calculate fragmentation
-               $fragmentation = $table["Data_free"] / $table["Data_length"];
+               $fragmentation = $table["Data_free"] / ($table["Data_length"] + $table["Index_length"]);
 
                logger("Table ".$table["Name"]." - Fragmentation level: ".round($fragmentation * 100, 2), LOGGER_DEBUG);
 
 
                logger("Table ".$table["Name"]." - Fragmentation level: ".round($fragmentation * 100, 2), LOGGER_DEBUG);