summaryrefslogtreecommitdiff
path: root/sql-bench/test-select.sh
diff options
context:
space:
mode:
authorunknown <monty@tik.mysql.com>2000-11-13 23:55:10 +0200
committerunknown <monty@tik.mysql.com>2000-11-13 23:55:10 +0200
commitf3d2341f1f30384d92b285c1e421d8c599ee2b79 (patch)
tree6689cb755cdb6ba0fb4cc6fbb215d75b175228d2 /sql-bench/test-select.sh
parent675d31ee9a14d636d838400c670d0a1c2b964c9a (diff)
downloadmariadb-git-f3d2341f1f30384d92b285c1e421d8c599ee2b79.tar.gz
Bug fixes, TRUNCATE, safer passwords on command line and connect timeout
Docs/manual.texi: Update of safe_mysqld, TRUNCATE and changes for 3.23.28 client/mysql.cc: Added --timeout client/mysqladmin.c: Safer password handling client/mysqldump.c: Safer password handling client/mysqlimport.c: Safer password handling client/mysqlshow.c: Safer password handling configure.in: Fixes for Darwin and added test of poll include/my_pthread.h: Fixes for darwin include/violite.h: Added test for polling libmysql/libmysql.c: connect timeout libmysql/violite.c: connect timeout mysys/hash.c: Fix when delting from empty table scripts/safe_mysqld.sh: Added --open-files, --core-file-size and --timezone sql-bench/bench-init.pl.sh: Function print_time sql-bench/crash-me.sh: Added test of truncate sql-bench/test-insert.sh: More "estimated" tests sql-bench/test-select.sh: More "estimated" tests sql/filesort.cc: Removed allocation of extra memory sql/ha_berkeley.cc: Better estimation of number of rows sql/item_create.cc: Truncate sql/item_create.h: Truncate sql/item_strfunc.cc: Removed usage of MY_FAE sql/lex.h: Truncate sql/lock.cc: Fixed possible loop bug sql/log.cc: Removed usage of FILE:s sql/mysqld.cc: Print of more server variables sql/sql_class.h: Changed FILE -> File sql/sql_insert.cc: Fixed bug in temptable handling sql/sql_lex.h: Cleanup sql/sql_load.cc: Removed usage of MY_FAE sql/sql_parse.cc: Cleanup + TRUNCATE sql/sql_select.cc: Cleanup + fix for INSERT ... SELECT sql/sql_yacc.yy: TRUNCATE sql/violite.c: Merge with client/violite.c strings/strstr-sparc.s: Fixed wrong register usage
Diffstat (limited to 'sql-bench/test-select.sh')
-rwxr-xr-xsql-bench/test-select.sh65
1 files changed, 38 insertions, 27 deletions
diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh
index 10b36e4be60..32059d6ac8a 100755
--- a/sql-bench/test-select.sh
+++ b/sql-bench/test-select.sh
@@ -205,10 +205,7 @@ for ($i=0 ; $i < $opt_small_loop_count ; $i++)
$opt_small_loop_count));
}
-if ($estimated)
-{ print "Estimated time"; }
-else
-{ print "Time"; }
+print_time($estimated);
print " for select_range ($count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
@@ -243,10 +240,7 @@ if ($limits->{'group_functions'})
last if ($estimated=predict_query_time($loop_time,$end_time,\$count,
$tests+1, $opt_loop_count));
}
- if ($estimated)
- { print "Estimated time"; }
- else
- { print "Time"; }
+ print_time($estimated);
print " for min_max_on_key ($count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
@@ -267,10 +261,7 @@ if ($limits->{'group_functions'})
last if ($estimated=predict_query_time($loop_time,$end_time,\$count,
$tests+1, $opt_loop_count));
}
- if ($estimated)
- { print "Estimated time"; }
- else
- { print "Time"; }
+ print_time($estimated);
print " for count_on_key ($count): " .
timestr(timediff($end_time, $loop_time),"all") . "\n\n";
@@ -289,54 +280,74 @@ if ($limits->{'group_functions'})
{
print "Testing count(distinct) on the table\n";
$loop_time=new Benchmark;
- $rows=0;
+ $rows=$estimated=$count=0;
for ($i=0 ; $i < $opt_medium_loop_count ; $i++)
{
+ $count+=2;
$rows+=fetch_all_rows($dbh,"select count(distinct region) from bench1");
$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,
+ $opt_medium_loop_count));
}
- $end_time=new Benchmark;
- print "Time for count_distinct ($i:$rows): " .
+ print_time($estimated);
+ print " for count_distinct ($count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
- $rows=0;
+ $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,
+ $opt_medium_loop_count));
}
- $end_time=new Benchmark;
- print "Time for count_distinct_group_on_key ($i:$rows): " .
+ print_time($estimated);
+ print " for count_distinct_group_on_key ($count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
- $rows=0;
+ $rows=$estimated=$count=0;
for ($i=0 ; $i < $opt_medium_loop_count ; $i++)
{
+ $count++;
$rows+=fetch_all_rows($dbh,"select grp,count(distinct idn) from bench1 group by grp");
+ $end_time=new Benchmark;
+ last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1,
+ $opt_medium_loop_count));
}
- $end_time=new Benchmark;
- print "Time for count_distinct_group_on_key_parts ($i:$rows): " .
+ print_time($estimated);
+ print " for count_distinct_group_on_key_parts ($count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
- $rows=0;
+ $rows=$estimated=$count=0;
for ($i=0 ; $i < $opt_medium_loop_count ; $i++)
{
+ $count++;
$rows+=fetch_all_rows($dbh,"select grp,count(distinct rev_idn) from bench1 group by grp");
+ $end_time=new Benchmark;
+ last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1,
+ $opt_medium_loop_count));
}
- $end_time=new Benchmark;
- print "Time for count_distinct_group ($i:$rows): " .
+ print_time($estimated);
+ print " for count_distinct_group ($count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
- $rows=0;
+ $rows=$estimated=$count=0;
for ($i=0 ; $i < $opt_medium_loop_count ; $i++)
{
+ $count++;
$rows+=fetch_all_rows($dbh,"select idn,count(distinct region) from bench1 group by idn");
+ $end_time=new Benchmark;
+ last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$i+1,
+ $opt_medium_loop_count));
}
- $end_time=new Benchmark;
- print "Time for count_distinct_big ($i:$rows): " .
+ print_time($estimated);
+ print " for count_distinct_big ($count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
}