Index: /trunk/tools/czartool/MySQLDb.pm
===================================================================
--- /trunk/tools/czartool/MySQLDb.pm	(revision 29279)
+++ /trunk/tools/czartool/MySQLDb.pm	(revision 29280)
@@ -131,4 +131,25 @@
 #######################################################################################
 # 
+# Optimizes a table 
+#
+#######################################################################################
+sub optimizeTable {
+    my ($self, $table) = @_;
+
+    my $query = $self->{_db}->prepare(<<SQL);
+    OPTIMIZE TABLE $table; 
+SQL
+
+    my $success = $query->execute;
+
+    print "* ";
+    if (!$success) {print "UN";}
+    print "successfully optimized '$table' table\n";
+
+    return $success;
+}
+
+#######################################################################################
+# 
 # Checks whether a certain table exists 
 #
