Commit 0e45edf3 authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-13669: Some MyRocks test take a long time

Make rocksdb.bloomfilter* tests 1.8x faster by doing loading in bulk
parent 2000a900
...@@ -12,7 +12,6 @@ select case when variable_value-@c > 0 then 'true' else 'false' end as checked f ...@@ -12,7 +12,6 @@ select case when variable_value-@c > 0 then 'true' else 'false' end as checked f
END// END//
DELIMITER ;// DELIMITER ;//
#BF is sometimes invoked and useful #BF is sometimes invoked and useful
--let $CF= --let $CF=
--source bloomfilter_table_def.inc --source bloomfilter_table_def.inc
...@@ -40,13 +39,25 @@ DELIMITER ;// ...@@ -40,13 +39,25 @@ DELIMITER ;//
# BUG: Prev() with prefix lookup should not use prefix bloom filter # BUG: Prev() with prefix lookup should not use prefix bloom filter
create table r1 (id1 bigint, id2 bigint, id3 bigint, v1 int, v2 text, primary key (id1, id2, id3)) engine=rocksdb DEFAULT CHARSET=latin1 collate latin1_bin; create table r1 (id1 bigint, id2 bigint, id3 bigint, v1 int, v2 text, primary key (id1, id2, id3)) engine=rocksdb DEFAULT CHARSET=latin1 collate latin1_bin;
--disable_query_log --disable_query_log
let $max = 100000; let $max = 100;
let $i = 1; let $i = 1;
create table t10(a int primary key);
insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t11(a int primary key);
insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C;
set @a=0;
set rocksdb_bulk_load=1;
while ($i <= $max) { while ($i <= $max) {
let $insert = INSERT INTO r1 VALUES ($i,$i,$i,$i,$i);
inc $i; inc $i;
eval $insert; eval insert into r1 select @a:=@a+1, @a, @a, @a, @a from t11;
} }
set rocksdb_bulk_load=0;
drop table t10, t11;
--enable_query_log --enable_query_log
call bloom_start(); call bloom_start();
select * from r1 where id1=1 and id2 in (1) order by id3 asc; select * from r1 where id1=1 and id2 in (1) order by id3 asc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment