diff options
| author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-11 12:29:12 +0300 |
|---|---|---|
| committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-11 12:29:12 +0300 |
| commit | 5ef122443451506aa5d5c432d80d808289282709 (patch) | |
| tree | a981e5df527e23e3978dd79bee5c4c3217d11b51 /mysql-test/include/index_merge_2sweeps.inc | |
| parent | d95f96ad1b9f581bb993dcb513aa1c8e089a6ac4 (diff) | |
| download | mariadb-git-5ef122443451506aa5d5c432d80d808289282709.tar.gz | |
MDEV-20804 Speed up main.index_merge_innodb
The test main.index_merge_innodb is taking very much time,
especially on later versions (10.2 and 10.3).
Some of this could be attributed to the use of INSERT...SELECT,
which is time-consumingly creating explicit record locks in InnoDB
for the locking read in the SELECT part.
In 10.3 and later, some slowness can be attributed to MDEV-12288,
which makes the InnoDB purge thread spend time to reset transaction
identifiers in the inserted records. If we prevent purge from
running before all tables are dropped, the test seems to be
10% faster on an unoptimized debug build on 10.5. (A proper fix
would be to implement MDEV-515 and stop writing row-level undo log
records for inserts into an empty table or partition.)
At the same time, it should not hurt to make main.index_merge_myisam
to use the sequence engine. Not only could it be a little faster,
but the test would be slightly more readable.
Diffstat (limited to 'mysql-test/include/index_merge_2sweeps.inc')
| -rw-r--r-- | mysql-test/include/index_merge_2sweeps.inc | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/mysql-test/include/index_merge_2sweeps.inc b/mysql-test/include/index_merge_2sweeps.inc index ef356e12969..836f83795a9 100644 --- a/mysql-test/include/index_merge_2sweeps.inc +++ b/mysql-test/include/index_merge_2sweeps.inc @@ -2,24 +2,15 @@ # # 2-sweeps read Index_merge test # -# The variable -# $engine_type -- storage engine to be tested -# has to be set before sourcing this script. -# # Last update: # 2006-08-02 ML test refactored # old name was index_merge_innodb2.test # main code went into include/index_merge_2sweeps.inc # +--source include/have_sequence.inc --echo #---------------- 2-sweeps read Index merge test 2 ------------------------------- -eval SET SESSION STORAGE_ENGINE = $engine_type; - ---disable_warnings -drop table if exists t1; ---enable_warnings - create table t1 ( pk int primary key, key1 int, @@ -30,17 +21,8 @@ create table t1 ( index(key2) ); - ---disable_query_log -begin; -let $1=1000; -while ($1) -{ - eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2'); - dec $1; -} -commit; ---enable_query_log +insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2' +from seq_1000_to_1; select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); |
