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
This commit is contained in:
unknown 2001-03-11 21:20:15 +02:00
commit 97acb7b3d1
11 changed files with 145 additions and 19 deletions

21
sql-bench/TODO Normal file
View file

@ -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|

View file

@ -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";

View file

@ -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,
@ -299,6 +343,20 @@ if ($limits->{'group_distinct_functions'})
print " for count_distinct ($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),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++)