diff options
Diffstat (limited to 'sql-bench')
-rw-r--r-- | sql-bench/test-ATIS.sh | 2 | ||||
-rw-r--r-- | sql-bench/test-alter-table.sh | 2 | ||||
-rw-r--r-- | sql-bench/test-big-tables.sh | 2 | ||||
-rw-r--r-- | sql-bench/test-connect.sh | 2 | ||||
-rw-r--r-- | sql-bench/test-select.sh | 29 | ||||
-rw-r--r-- | sql-bench/test-transactions.sh | 4 | ||||
-rw-r--r-- | sql-bench/test-wisconsin.sh | 2 |
7 files changed, 32 insertions, 11 deletions
diff --git a/sql-bench/test-ATIS.sh b/sql-bench/test-ATIS.sh index 79b38a95506..ee697d4f319 100644 --- a/sql-bench/test-ATIS.sh +++ b/sql-bench/test-ATIS.sh @@ -28,7 +28,7 @@ use Cwd; use DBI; use Benchmark; -$opt_loop_count=100; # Run selects this many times +$opt_loop_count=5000; # Run selects this many times $pwd = cwd(); $pwd = "." if ($pwd eq ''); require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; diff --git a/sql-bench/test-alter-table.sh b/sql-bench/test-alter-table.sh index 36db26f4bf3..03d40a01276 100644 --- a/sql-bench/test-alter-table.sh +++ b/sql-bench/test-alter-table.sh @@ -25,7 +25,7 @@ use DBI; use Benchmark; $opt_start_field_count=8; # start with this many fields -$opt_loop_count=100; # How many tests to do +$opt_loop_count=10000; # How many tests to do $opt_row_count=1000; # Rows in the table $opt_field_count=1000; # Add until this many fields. $opt_time_limit=10*60; # Don't wait more than 10 min for some tests diff --git a/sql-bench/test-big-tables.sh b/sql-bench/test-big-tables.sh index 33694a42e17..de2b0830bd3 100644 --- a/sql-bench/test-big-tables.sh +++ b/sql-bench/test-big-tables.sh @@ -25,7 +25,7 @@ use Cwd; use DBI; use Benchmark; -$opt_loop_count=1000; # Change this to make test harder/easier +$opt_loop_count=70000; # Change this to make test harder/easier $opt_field_count=1000; $pwd = cwd(); $pwd = "." if ($pwd eq ''); diff --git a/sql-bench/test-connect.sh b/sql-bench/test-connect.sh index 52566f7bb54..d2b8530ed0d 100644 --- a/sql-bench/test-connect.sh +++ b/sql-bench/test-connect.sh @@ -28,7 +28,7 @@ use Cwd; use DBI; use Benchmark; -$opt_loop_count=100000; # Change this to make test harder/easier +$opt_loop_count=500000; # Change this to make test harder/easier $str_length=65000; # This is the length of blob strings in PART:5 $max_test=20; # How many times to test if the server is busy diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh index 41e8205196e..a3162b29dc3 100644 --- a/sql-bench/test-select.sh +++ b/sql-bench/test-select.sh @@ -26,7 +26,7 @@ use Getopt::Long; use Benchmark; $opt_loop_count=10000; -$opt_medium_loop_count=1000; +$opt_medium_loop_count=7000; $opt_small_loop_count=10; $opt_regions=6; $opt_groups=100; @@ -68,7 +68,8 @@ do_many($dbh,$server->create("bench1", ["region char(1) NOT NULL", "idn integer(6) NOT NULL", "rev_idn integer(6) NOT NULL", - "grp integer(6) NOT NULL"], + "grp integer(6) NOT NULL", + "grp_no_key integer(6) NOT NULL"], ["primary key (region,idn)", "unique (region,rev_idn)", "unique (region,grp,idn)"])); @@ -105,10 +106,10 @@ for ($id=0,$rev_id=$opt_loop_count-1 ; $id < $opt_loop_count ; $id++,$rev_id--) { $grp=$id*3 % $opt_groups; $region=chr(65+$id%$opt_regions); - do_query($dbh,"$query'$region',$id,$rev_id,$grp)"); + do_query($dbh,"$query'$region',$id,$rev_id,$grp,$grp)"); if ($id == $half_done) { # Test with different insert - $query="insert into bench1 (region,idn,rev_idn,grp) values ("; + $query="insert into bench1 (region,idn,rev_idn,grp,grp_no_key) values ("; } } @@ -323,6 +324,26 @@ if ($limits->{'group_functions'}) $end_time=new Benchmark; print "Time for count_group_on_key_parts ($i:$rows): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; + + $loop_time=new Benchmark; + $rows=0; + for ($i=0 ; $i < $opt_medium_loop_count ; $i++) + { + $rows+=fetch_all_rows($dbh,"select grp_no_key,count(*) from bench1 group by grp_no_key"); + } + $end_time=new Benchmark; + print "Time for count_group ($i:$rows): " . + timestr(timediff($end_time, $loop_time),"all") . "\n"; + + $loop_time=new Benchmark; + $rows=0; + for ($i=0 ; $i < $opt_medium_loop_count ; $i++) + { + $rows+=fetch_all_rows($dbh,"select grp_no_key,count(*) as cnt from bench1 group by grp_no_key order by cnt"); + } + $end_time=new Benchmark; + print "Time for count_group_with_order ($i:$rows): " . + timestr(timediff($end_time, $loop_time),"all") . "\n"; } if ($limits->{'group_distinct_functions'}) diff --git a/sql-bench/test-transactions.sh b/sql-bench/test-transactions.sh index edbfef0e3ce..f6de5641cbd 100644 --- a/sql-bench/test-transactions.sh +++ b/sql-bench/test-transactions.sh @@ -28,8 +28,8 @@ use Benchmark; $opt_groups=27; # Characters are 'A' -> Z -$opt_loop_count=10000; # Change this to make test harder/easier -$opt_medium_loop_count=100; # Change this to make test harder/easier +$opt_loop_count=500000; # Change this to make test harder/easier +$opt_medium_loop_count=10000; # Change this to make test harder/easier $pwd = cwd(); $pwd = "." if ($pwd eq ''); require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; diff --git a/sql-bench/test-wisconsin.sh b/sql-bench/test-wisconsin.sh index 1974461a7c4..0dbd88dd62d 100644 --- a/sql-bench/test-wisconsin.sh +++ b/sql-bench/test-wisconsin.sh @@ -21,7 +21,7 @@ use Cwd; use DBI; use Benchmark; -$opt_loop_count=10; +$opt_loop_count=5000; $pwd = cwd(); $pwd = "." if ($pwd eq ''); require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; |