summaryrefslogtreecommitdiff
path: root/sql-bench/test-insert.sh
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-12-24 15:19:00 +0200
committerunknown <monty@donna.mysql.com>2000-12-24 15:19:00 +0200
commit78cf07c8ea126fc03706988de23893ca4680ac77 (patch)
tree899e99579647137316d4fbc999750fb989b1cf2e /sql-bench/test-insert.sh
parentb23a560f84a33ee28d630f6baf7b4f7848fa3db8 (diff)
downloadmariadb-git-78cf07c8ea126fc03706988de23893ca4680ac77.tar.gz
New benchmark test
Fixed bug in REPLACE with BDB tables Prepare for write lock on read for BDB Inform the handler when we want to use IGNORE / REPLACE New manual pages Docs/manual.texi: Updates for BDB tables and new changes client/mysql.cc: Cleanup configure.in: Added sys/ioctl.h heap/hp_rkey.c: Fixed bug when reading next on not unique key include/my_base.h: Added new extra options man/mysql.1: Added example mysys/my_write.c: Safety fix scripts/mysqlaccess.sh: Removed debug output scripts/safe_mysqld.sh: Added --open-files-limit sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/bench-init.pl.sh: Updated to new benchmark sql-bench/server-cfg.sh: Fixes for HEAP tables sql-bench/test-ATIS.sh: Fix for heap tables sql-bench/test-insert.sh: Added some ORDER BY benchmarks to test more things sql/ha_berkeley.cc: Fix a bug in REPLACE sql/ha_berkeley.h: Fix to handle lock_on_read sql/mysql_priv.h: Prepare for internal subtransactions in BDB sql/mysqld.cc: Added -O open_files_limit=# sql/sql_insert.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_load.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_parse.cc: Cleanup sql/sql_show.cc: Cleanup sql/sql_table.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_update.cc: Inform the handler when we want to use IGNORE / REPLACE support-files/binary-configure.sh: Better message
Diffstat (limited to 'sql-bench/test-insert.sh')
-rw-r--r--sql-bench/test-insert.sh44
1 files changed, 39 insertions, 5 deletions
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh
index 7bed5f18c3d..b2fa52cfdf1 100644
--- a/sql-bench/test-insert.sh
+++ b/sql-bench/test-insert.sh
@@ -291,7 +291,7 @@ $loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
{
- $rows+=fetch_all_rows($dbh,"select id from bench1 order by id",1);
+ $rows+=fetch_all_rows($dbh,"select id,id2 from bench1 order by id,id2",1);
$end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count));
@@ -303,11 +303,12 @@ else
print " for order_by_big_key ($small_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
+
$loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
{
- $rows+=fetch_all_rows($dbh,"select id from bench1 order by id desc",1);
+ $rows+=fetch_all_rows($dbh,"select id,id2 from bench1 order by id desc, id2 desc",1);
$end_time=new Benchmark;
last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
$small_loop_count));
@@ -319,6 +320,24 @@ else
print " for order_by_big_key_desc ($small_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
+
+$loop_time=new Benchmark;
+$estimated=$rows=0;
+for ($i=1 ; $i <= $small_loop_count ; $i++)
+{
+ $rows+=fetch_all_rows($dbh,"select id from bench1 order by id desc",1);
+ $end_time=new Benchmark;
+ last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i,
+ $small_loop_count));
+}
+if ($estimated)
+{ print "Estimated time"; }
+else
+{ print "Time"; }
+print " for order_by_big_key_prefix ($small_loop_count:$rows): " .
+ timestr(timediff($end_time, $loop_time),"all") . "\n";
+
+
$loop_time=new Benchmark;
$estimated=$rows=0;
for ($i=1 ; $i <= $small_loop_count ; $i++)
@@ -407,7 +426,7 @@ if ($estimated)
{ print "Estimated time"; }
else
{ print "Time"; }
-print " for order_by_key ($range_loop_count:$rows): " .
+print " for order_by_key_prefix ($range_loop_count:$rows): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$sel=$limits->{'order_by_unused'} ? "id2" : "id2,id3";
@@ -889,13 +908,23 @@ print "Testing update with key\n";
$loop_time=new Benchmark;
for ($i=0 ; $i < $opt_loop_count*3 ; $i++)
{
- $sth = $dbh->do("update bench1 set dummy1='updated' where id=$i") or die $DBI::errstr;
+ $sth = $dbh->do("update bench1 set dummy1='updated' where id=$i and id2=$i") or die $DBI::errstr;
}
$end_time=new Benchmark;
print "Time for update_with_key (" . ($opt_loop_count*3) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
+$loop_time=new Benchmark;
+for ($i=0 ; $i < $opt_loop_count*3 ; $i+=3)
+{
+ $sth = $dbh->do("update bench1 set dummy1='updated' where id=$i") or die $DBI::errstr;
+}
+
+$end_time=new Benchmark;
+print "Time for update_with_key_prefix (" . ($opt_loop_count) . "): " .
+ timestr(timediff($end_time, $loop_time),"all") . "\n";
+
print "\nTesting update of all rows\n";
$loop_time=new Benchmark;
for ($i=0 ; $i < $small_loop_count ; $i++)
@@ -1530,7 +1559,12 @@ sub check_or_range
$estimated=0;
$loop_time=new Benchmark;
$found=0;
- $loop_count=$range_loop_count*10;
+ # The number of tests must be divisible by the following
+ $tmp= $limits->{'func_extra_in_num'} ? 15 : 10;
+ # We need to calculate the exact number of test to make 'Estimated' right
+ $loop_count=$range_loop_count*10+$tmp-1;
+ $loop_count=$loop_count- ($loop_count % $tmp);
+
for ($count=0 ; $count < $loop_count ; )
{
for ($rowcnt=0; $rowcnt <= $columns; $rowcnt+= $columns/4)