summaryrefslogtreecommitdiff
path: root/sql-bench/server-cfg.sh
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2000-09-13 01:08:34 +0300
committermonty@donna.mysql.com <>2000-09-13 01:08:34 +0300
commit47265938625c8cb7832cf15a8e39caf6b64c4b30 (patch)
tree42c131dcc09b3b264d33b14120eaae7687ab2425 /sql-bench/server-cfg.sh
parentf2d930c388eb48174addd3e0cd542f3d0811ac6e (diff)
downloadmariadb-git-47265938625c8cb7832cf15a8e39caf6b64c4b30.tar.gz
Fixes for FULLTEXT and TIME type
Diffstat (limited to 'sql-bench/server-cfg.sh')
-rwxr-xr-xsql-bench/server-cfg.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh
index c854fc5a962..a49893c53e0 100755
--- a/sql-bench/server-cfg.sh
+++ b/sql-bench/server-cfg.sh
@@ -116,6 +116,7 @@ sub new
$self->{'blob'} = "blob";
$self->{'text'} = "text";
$self->{'double_quotes'} = 1; # Can handle: 'Walker''s'
+ $self->{'vacuum'} = 1; # When using with --fast
$limits{'max_conditions'} = 9999; # (Actually not a limit)
$limits{'max_columns'} = 2000; # Max number of columns in table
@@ -308,6 +309,26 @@ sub reconnect_on_errors
return 0;
}
+#
+# Optimize tables for better performance
+#
+
+sub vacuum
+{
+ my ($self,$full_vacuum,$dbh_ref,@tables)=@_;
+ my ($loop_time,$end_time,$dbh);
+ if ($#tables >= 0)
+ {
+ $dbh=$$dbh_ref;
+ $loop_time=new Benchmark;
+ $dbh->do("OPTIMIZE TABLE " . join(',',@tables)) || die "Got error: $DBI::errstr when executing 'OPTIMIZE TABLE'\n";
+ $end_time=new Benchmark;
+ print "Time for book-keeping (1): " .
+ Benchmark::timestr(Benchmark::timediff($end_time, $loop_time),"all") . "\n\n";
+ }
+}
+
+
#############################################################################
# Definitions for mSQL
#############################################################################