diff options
author | unknown <monty@donna.mysql.com> | 2000-09-13 01:08:34 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-09-13 01:08:34 +0300 |
commit | 1040f1ac8ec95fcd2f42bc3b4d74d5ee01584e8f (patch) | |
tree | 42c131dcc09b3b264d33b14120eaae7687ab2425 /sql-bench | |
parent | de04a97b613356f19bfbe67856cda64774865832 (diff) | |
download | mariadb-git-1040f1ac8ec95fcd2f42bc3b4d74d5ee01584e8f.tar.gz |
Fixes for FULLTEXT and TIME type
Docs/manual.texi:
Update of Linux notes and mysql_install_db
include/my_tree.h:
new tree function
myisam/ft_parser.c:
Fix free() bug
myisam/ft_search.c:
Fix free() bug
myisam/ft_update.c:
Fix free() bug
scripts/safe_mysqld.sh:
Check if we run as root
sql-bench/Results-linux/ATIS-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/ATIS-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/RUN-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/RUN-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/alter-table-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/alter-table-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/big-tables-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/big-tables-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/connect-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/connect-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/create-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/create-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/insert-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/insert-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/select-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/select-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/Results-linux/wisconsin-mysql_fast-Linux_2.2.13_SMP_alpha:
***MISSING WEAVE***
sql-bench/server-cfg.sh:
Added use of OPTIMIZE TABLE
sql-bench/test-ATIS.sh:
Added use of OPTIMIZE TABLE
sql-bench/test-insert.sh:
Added use of OPTIMIZE TABLE
sql-bench/test-select.sh:
Added use of OPTIMIZE TABLE
sql-bench/test-wisconsin.sh:
Added use of OPTIMIZE TABLE
sql/field.cc:
Fix TIME type
sql/item_func.h:
Fixed Free bug
Diffstat (limited to 'sql-bench')
-rw-r--r-- | sql-bench/Comments/mysql.benchmark | 39 | ||||
-rwxr-xr-x | sql-bench/server-cfg.sh | 21 | ||||
-rwxr-xr-x | sql-bench/test-ATIS.sh | 26 | ||||
-rwxr-xr-x | sql-bench/test-insert.sh | 60 | ||||
-rwxr-xr-x | sql-bench/test-select.sh | 12 | ||||
-rwxr-xr-x | sql-bench/test-wisconsin.sh | 21 |
6 files changed, 152 insertions, 27 deletions
diff --git a/sql-bench/Comments/mysql.benchmark b/sql-bench/Comments/mysql.benchmark new file mode 100644 index 00000000000..9c28e8e506b --- /dev/null +++ b/sql-bench/Comments/mysql.benchmark @@ -0,0 +1,39 @@ +# This file describes how to run MySQL benchmarks with MySQL +# + +# The test was run on a Intel Xeon 2x 550 Mzh machine with 1G memory, +# 9G hard disk. The OS is Suse 6.4, with Linux 2.2.14 compiled with SMP +# support +# Both the perl client and the database server is run +# on the same machine. No other cpu intensive process was used during +# the benchmark. + +# +# +# First, install MySQL from RPM or compile it according to the +# recommendations in the MySQL manual +# + +# Start MySQL + +bin/safe_mysqld -O key_buffer=16M & + +# +# Now we run the test that can be found in the sql-bench directory in the +# MySQL 3.23 source distribution with and without --fast +# +# Note that if you want to make a results that is comparead to some database, +# You should add "--cmp=databasename" as an extra option to the test +# +$CMP=--cmp=pg + +run-all-tests --comment="Intel Xeon, 2x550 Mhz, 1G, key_buffer=16M" $CMP +run-all-tests --comment="Intel Xeon, 2x550 Mhz, 1G, key_buffer=16M" --fast $CMP + +# If you want to store the results in a output/RUN-xxx file, you should +# repeate the benchmark with the extra option --log --use-old-result +# This will create a the RUN file based of the previous results +# + +run-all-tests --comment="Intel Xeon, 2x550 Mhz, 1G, key_buffer=16M" --log --use-old-result $CMP +run-all-tests --comment="Intel Xeon, 2x550 Mhz, 1G, key_buffer=16M" --fast --log --use-old-result $CMP 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 ############################################################################# diff --git a/sql-bench/test-ATIS.sh b/sql-bench/test-ATIS.sh index 35ec616d8f5..aefff503f58 100755 --- a/sql-bench/test-ATIS.sh +++ b/sql-bench/test-ATIS.sh @@ -71,10 +71,10 @@ if (!$opt_skip_create) print "Time for create_table (" . ($#tables+1) ."): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; -if ($opt_fast && defined($server->{vacuum})) -{ - $server->vacuum(0,\$dbh); -} + if ($opt_fast && defined($server->{vacuum})) + { + $server->vacuum(0,\$dbh); + } #### #### Insert data @@ -130,22 +130,26 @@ if ($opt_fast && defined($server->{vacuum})) } close(DATA); } + if ($opt_lock_tables) + { + $dbh->do("UNLOCK TABLES"); + } $end_time=new Benchmark; print "Time to insert ($row_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; } -elsif ($opt_lock_tables) -{ - @tmp=@table_names; push(@tmp,@extra_names); - $sth = $dbh->do("LOCK TABLES " . join(" READ,", @tmp) . " READ") || - die $DBI::errstr; -} if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(0,\$dbh); + $server->vacuum(0,\$dbh,@table_names); } +if ($opt_lock_tables) +{ + @tmp=@table_names; push(@tmp,@extra_names); + $sth = $dbh->do("LOCK TABLES " . join(" READ,", @tmp) . " READ") || + die $DBI::errstr; +} # # Now the fun begins. Let's do some simple queries on the result # diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh index af5569510c7..e1674f3e18d 100755 --- a/sql-bench/test-insert.sh +++ b/sql-bench/test-insert.sh @@ -206,9 +206,17 @@ $end_time=new Benchmark; print "Time for insert (" . ($total_rows) . "): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; +if ($opt_lock_tables) +{ + $sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr; +} if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(1,\$dbh); + $server->vacuum(1,\$dbh,"bench1"); +} +if ($opt_lock_tables) +{ + $sth = $dbh->do("LOCK TABLES bench1 WRITE") || die $DBI::errstr; } #### @@ -235,10 +243,10 @@ $end_time=new Benchmark; print "Time for insert_duplicates (" . ($total_rows) . "): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; -if ($opt_fast && defined($server->{vacuum})) -{ - $server->vacuum(1,\$dbh); -} +#if ($opt_fast && defined($server->{vacuum})) +#{ +# $server->vacuum(1,\$dbh); +#} #### #### Do some selects on the table @@ -605,9 +613,17 @@ if ($limits->{'functions'}) print "Time for update_of_key ($range_loop_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; + if ($opt_lock_tables) + { + do_query($dbh,"UNLOCK TABLES"); + } if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(1,\$dbh); + $server->vacuum(1,\$dbh,"bench1"); + } + if ($opt_lock_tables) + { + $sth = $dbh->do("LOCK TABLES bench1 WRITE") || die $DBI::errstr; } if ($server->small_rollback_segment()) @@ -735,7 +751,15 @@ else if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(1,\$dbh); + if ($opt_lock_tables) + { + do_query($dbh,"UNLOCK TABLES"); + } + $server->vacuum(1,\$dbh,"bench1"); + if ($opt_lock_tables) + { + $sth = $dbh->do("LOCK TABLES bench1 WRITE") || die $DBI::errstr; + } } # @@ -902,7 +926,7 @@ if (!$opt_skip_delete) if ($opt_lock_tables) { - $sth = $dbh->do("UNLOCK TABLES ") || die $DBI::errstr; + $sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr; } $sth = $dbh->do("drop table bench1") or die $DBI::errstr; } @@ -1029,7 +1053,15 @@ if ($server->small_rollback_segment()) } if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(1,\$dbh); + if ($opt_lock_tables) + { + do_query($dbh,"UNLOCK TABLES"); + } + $server->vacuum(1,\$dbh,"bench1"); + if ($opt_lock_tables) + { + $sth = $dbh->do("LOCK TABLES bench1 WRITE") || die $DBI::errstr; + } } # @@ -1054,7 +1086,15 @@ if ($server->small_rollback_segment()) } if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(1,\$dbh); + if ($opt_lock_tables) + { + do_query($dbh,"UNLOCK TABLES"); + } + $server->vacuum(1,\$dbh,"bench1"); + if ($opt_lock_tables) + { + $sth = $dbh->do("LOCK TABLES bench1 WRITE") || die $DBI::errstr; + } } if ($server->small_rollback_segment()) diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh index 21a5b2307c9..160a10a1c33 100755 --- a/sql-bench/test-select.sh +++ b/sql-bench/test-select.sh @@ -109,9 +109,19 @@ $end_time=new Benchmark; print "Time to insert ($opt_loop_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; +if ($opt_lock_tables) +{ + do_query($dbh,"UNLOCK TABLES"); +} + if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(0,\$dbh); + $server->vacuum(0,\$dbh,"bench1"); +} + +if ($opt_lock_tables) +{ + do_query($dbh,"LOCK TABLES bench1 WRITE"); } #### diff --git a/sql-bench/test-wisconsin.sh b/sql-bench/test-wisconsin.sh index 00b0e933c4d..f54e5ef5a75 100755 --- a/sql-bench/test-wisconsin.sh +++ b/sql-bench/test-wisconsin.sh @@ -65,10 +65,10 @@ if (!$opt_skip_create) print "Time for create_table ($#tables): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; -if ($opt_fast && defined($server->{vacuum})) -{ - $server->vacuum(1,\$dbh); -} + if ($opt_fast && defined($server->{vacuum})) + { + $server->vacuum(1,\$dbh); + } #### @@ -124,6 +124,10 @@ else } close(DATA); } +if ($opt_lock_tables) +{ + do_query($dbh,"UNLOCK TABLES"); +} $end_time=new Benchmark; print "Time to insert ($row_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; @@ -138,7 +142,14 @@ if ($server->small_rollback_segment()) if ($opt_fast && defined($server->{vacuum})) { - $server->vacuum(0,\$dbh); + $server->vacuum(0,\$dbh,@table_names); +} + +if ($opt_lock_tables) +{ + @tmp=@table_names; push(@tmp,@extra_names); + $sth = $dbh->do("LOCK TABLES " . join(" WRITE,", @tmp) . " WRITE") || + die $DBI::errstr; } $loop_time= $end_time; |