diff options
author | unknown <monty@donna.mysql.fi> | 2001-03-11 21:20:15 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-03-11 21:20:15 +0200 |
commit | 5de5710f46444b596e4dcdcbd51cfd1c86f4cf62 (patch) | |
tree | 3ffab1dce3f9b12f0d98de2289a2022d1e7f3327 /sql-bench | |
parent | a791aa292811c1ab30e4502beb7075ad2795f0ce (diff) | |
download | mariadb-git-5de5710f46444b596e4dcdcbd51cfd1c86f4cf62.tar.gz |
Added new tests to benchmark suite
Docs/manual.texi:
Updated some typos in the innobase section
client/mysql.cc:
Added print of field types (for debugging)
client/mysqladmin.c:
Added timeout for shutdown
mysql-test/mysql-test-run.sh:
Use timeout for shutdown
sql-bench/test-select.sh:
Added test of query cache and new tests for count(distinct)
sql/ha_myisam.cc:
Don't give warnings for RESTORE TABLE
sql/mysqld.cc:
Added printing of innobase options
sql/sql_lex.cc:
Fixed possible bug when OEM
sql/sql_table.cc:
cleanup
Diffstat (limited to 'sql-bench')
-rw-r--r-- | sql-bench/TODO | 21 | ||||
-rw-r--r-- | sql-bench/bench-init.pl.sh | 2 | ||||
-rw-r--r-- | sql-bench/test-select.sh | 60 |
3 files changed, 81 insertions, 2 deletions
diff --git a/sql-bench/TODO b/sql-bench/TODO new file mode 100644 index 00000000000..8a103e89199 --- /dev/null +++ b/sql-bench/TODO @@ -0,0 +1,21 @@ +When comparing with ms-sql: + +Check how to get MySQL faster mysql ms-sql + +count_distinct (2000) | 89.00| 39.00| +count_distinct_big (120) | 324.00| 121.00| +count_distinct_group (1000) | 158.00| 107.00| +count_distinct_group_on_key (1000) | 49.00| 17.00| +count_distinct_group_on_key_parts (1| 157.00| 108.00| +order_by_big (10) | 197.00| 89.00| +order_by_big_key (10) | 170.00| 82.00| +order_by_big_key2 (10) | 163.00| 73.00| +order_by_big_key_desc (10) | 172.00| 84.00| +order_by_big_key_diff (10) | 193.00| 89.00| +order_by_big_key_prefix (10) | 165.00| 72.00| + + +Why is the following slow on NT: + NT Linux +update_of_primary_key_many_keys (256| 560.00| 65.00| + diff --git a/sql-bench/bench-init.pl.sh b/sql-bench/bench-init.pl.sh index d18d2c79ced..165b15a0ede 100644 --- a/sql-bench/bench-init.pl.sh +++ b/sql-bench/bench-init.pl.sh @@ -31,7 +31,7 @@ # $server Object for current server # $limits Hash reference to limits for benchmark -$benchmark_version="2.11a"; +$benchmark_version="2.12"; use Getopt::Long; require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n"; diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh index e75ee26fff8..3c7efe3c5c2 100644 --- a/sql-bench/test-select.sh +++ b/sql-bench/test-select.sh @@ -130,6 +130,37 @@ if ($opt_lock_tables) select_test: +if ($limits->{'group_functions'}) +{ + my ($tmp); $tmp=1000; + print "Test if the database has a query cache\n"; + + # First ensure that the table is read into memory + fetch_all_rows($dbh,"select sum(idn+$tmp),sum(rev_idn+$tmp) from bench1"); + + $loop_time=new Benchmark; + for ($tests=0 ; $tests < $opt_loop_count ; $tests++) + { + fetch_all_rows($dbh,"select sum(idn+$tests),sum(rev_idn+$tests) from bench1"); + } + $end_time=new Benchmark; + print "Time for select_query_cache ($opt_loop_count): " . + timestr(timediff($end_time, $loop_time),"all") . "\n\n"; + + # If the database has a query cache, the following loop should be much + # slower than the previous loop + + $loop_time=new Benchmark; + for ($tests=0 ; $tests < $opt_loop_count ; $tests++) + { + fetch_all_rows($dbh,"select sum(idn+$tests),sum(rev_idn+$tests) from bench1"); + } + $end_time=new Benchmark; + print "Time for select_query_cache2 ($opt_loop_count): " . + timestr(timediff($end_time, $loop_time),"all") . "\n\n"; +} + + print "Testing big selects on the table\n"; $loop_time=new Benchmark; $rows=0; @@ -288,8 +319,21 @@ if ($limits->{'group_distinct_functions'}) $rows=$estimated=$count=0; for ($i=0 ; $i < $opt_medium_loop_count ; $i++) { - $count+=2; + $count++; $rows+=fetch_all_rows($dbh,"select count(distinct region) from bench1"); + $end_time=new Benchmark; + last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1, + $opt_medium_loop_count)); + } + print_time($estimated); + print " for count_distinct_key_prefix ($count:$rows): " . + timestr(timediff($end_time, $loop_time),"all") . "\n"; + + $loop_time=new Benchmark; + $rows=$estimated=$count=0; + for ($i=0 ; $i < $opt_medium_loop_count ; $i++) + { + $count++; $rows+=fetch_all_rows($dbh,"select count(distinct grp) from bench1"); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1, @@ -304,6 +348,20 @@ if ($limits->{'group_distinct_functions'}) for ($i=0 ; $i < $opt_medium_loop_count ; $i++) { $count++; + $rows+=fetch_all_rows($dbh,"select count(distinct grp),count(distinct rev_idn) from bench1"); + $end_time=new Benchmark; + last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1, + $opt_medium_loop_count)); + } + print_time($estimated); + print " for count_distinct_2 ($count:$rows): " . + timestr(timediff($end_time, $loop_time),"all") . "\n"; + + $loop_time=new Benchmark; + $rows=$estimated=$count=0; + for ($i=0 ; $i < $opt_medium_loop_count ; $i++) + { + $count++; $rows+=fetch_all_rows($dbh,"select region,count(distinct idn) from bench1 group by region"); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1, |