From 47265938625c8cb7832cf15a8e39caf6b64c4b30 Mon Sep 17 00:00:00 2001 From: "monty@donna.mysql.com" <> Date: Wed, 13 Sep 2000 01:08:34 +0300 Subject: Fixes for FULLTEXT and TIME type --- sql-bench/server-cfg.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'sql-bench/server-cfg.sh') 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 ############################################################################# -- cgit v1.2.1