CREATE PROCEDURE bloom_start()
BEGIN
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
END//
CREATE PROCEDURE bloom_end()
BEGIN
select case when variable_value-@c > 0 then 'true' else 'false' end as checked from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
END//
create or replace table t1 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id1, id2, id3, id4) ,
index id2 (id2) ,
index id2_id1 (id2, id1) ,
index id2_id3 (id2, id3) ,
index id2_id4 (id2, id4) ,
index id2_id3_id1_id4 (id2, id3, id1, id4) ,
index id3_id2 (id3, id2) 
) engine=ROCKSDB;
create or replace table t2 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id4) ,
index id2 (id2) ,
index id2_id3 (id2, id3) ,
index id2_id4 (id2, id4) ,
index id2_id4_id5 (id2, id4, id5) ,
index id3_id4 (id3, id4) ,
index id3_id5 (id3, id5) 
) engine=ROCKSDB;
insert t1
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
  from seq_1_to_10000;
insert t2 select * from t1;
set global rocksdb_force_flush_memtable_now=1;
call bloom_start();
select count(*) from t1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(PRIMARY) where id1 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1) where id2 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index(id3_id4) where id3 >= '1';
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=2 and id1=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=24 and id1=12;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=88 and id1=44;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=100 and id1=50;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=428 and id1=214;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=1 and id4=1 and id5=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=23 and id4=115 and id5=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=500 and id4=2500 and id5=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=601 and id4=3005 and id5=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=1 and id3='1' and id1=1 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36 and id3='36' and id1=18 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124' and id1=62 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=888 and id3='888' and id1=444 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1 and id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=12 and id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=1;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=12;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=23;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=100;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=234;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=234;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=1 and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=23 and id4=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=500 and id4=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=601 and id4=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='100' and id5=500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='240' and id5=1200;
count(*)
1
call bloom_end();
checked
false
create or replace table t1 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id1, id2, id3, id4) COMMENT 'cf_short_prefix',
index id2 (id2) COMMENT 'cf_short_prefix',
index id2_id1 (id2, id1) COMMENT 'cf_short_prefix',
index id2_id3 (id2, id3) COMMENT 'cf_short_prefix',
index id2_id4 (id2, id4) COMMENT 'cf_short_prefix',
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'cf_short_prefix',
index id3_id2 (id3, id2) COMMENT 'cf_short_prefix'
) engine=ROCKSDB;
create or replace table t2 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id4) COMMENT 'cf_short_prefix',
index id2 (id2) COMMENT 'cf_short_prefix',
index id2_id3 (id2, id3) COMMENT 'cf_short_prefix',
index id2_id4 (id2, id4) COMMENT 'cf_short_prefix',
index id2_id4_id5 (id2, id4, id5) COMMENT 'cf_short_prefix',
index id3_id4 (id3, id4) COMMENT 'cf_short_prefix',
index id3_id5 (id3, id5) COMMENT 'cf_short_prefix'
) engine=ROCKSDB;
insert t1
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
  from seq_1_to_10000;
insert t2 select * from t1;
set global rocksdb_force_flush_memtable_now=1;
call bloom_start();
select count(*) from t1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(PRIMARY) where id1 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1) where id2 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index(id3_id4) where id3 >= '1';
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=2 and id1=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=24 and id1=12;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=88 and id1=44;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=100 and id1=50;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=428 and id1=214;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=1 and id4=1 and id5=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=23 and id4=115 and id5=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=500 and id4=2500 and id5=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=601 and id4=3005 and id5=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=1 and id3='1' and id1=1 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36 and id3='36' and id1=18 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124' and id1=62 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=888 and id3='888' and id1=444 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1 and id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=12 and id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=1;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=12;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=23;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=100;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=234;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=234;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=1 and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=23 and id4=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=500 and id4=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=601 and id4=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='100' and id5=500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='240' and id5=1200;
count(*)
1
call bloom_end();
checked
false
create or replace table t1 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id1, id2, id3, id4) COMMENT 'rev:cf_short_prefix',
index id2 (id2) COMMENT 'rev:cf_short_prefix',
index id2_id1 (id2, id1) COMMENT 'rev:cf_short_prefix',
index id2_id3 (id2, id3) COMMENT 'rev:cf_short_prefix',
index id2_id4 (id2, id4) COMMENT 'rev:cf_short_prefix',
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'rev:cf_short_prefix',
index id3_id2 (id3, id2) COMMENT 'rev:cf_short_prefix'
) engine=ROCKSDB;
create or replace table t2 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id4) COMMENT 'rev:cf_short_prefix',
index id2 (id2) COMMENT 'rev:cf_short_prefix',
index id2_id3 (id2, id3) COMMENT 'rev:cf_short_prefix',
index id2_id4 (id2, id4) COMMENT 'rev:cf_short_prefix',
index id2_id4_id5 (id2, id4, id5) COMMENT 'rev:cf_short_prefix',
index id3_id4 (id3, id4) COMMENT 'rev:cf_short_prefix',
index id3_id5 (id3, id5) COMMENT 'rev:cf_short_prefix'
) engine=ROCKSDB;
insert t1
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
  from seq_1_to_10000;
insert t2 select * from t1;
set global rocksdb_force_flush_memtable_now=1;
call bloom_start();
select count(*) from t1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(PRIMARY) where id1 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1) where id2 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index(id3_id4) where id3 >= '1';
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=2 and id1=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=24 and id1=12;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=88 and id1=44;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=100 and id1=50;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=428 and id1=214;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=1 and id4=1 and id5=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=23 and id4=115 and id5=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=500 and id4=2500 and id5=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=601 and id4=3005 and id5=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=1 and id3='1' and id1=1 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36 and id3='36' and id1=18 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124' and id1=62 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=888 and id3='888' and id1=444 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1 and id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=12 and id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=1;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=12;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=23;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=100;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=234;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=234;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=1 and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=23 and id4=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=500 and id4=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=601 and id4=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='100' and id5=500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='240' and id5=1200;
count(*)
1
call bloom_end();
checked
false
create or replace table t1 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id1, id2, id3, id4) COMMENT 'cf_long_prefix',
index id2 (id2) COMMENT 'cf_long_prefix',
index id2_id1 (id2, id1) COMMENT 'cf_long_prefix',
index id2_id3 (id2, id3) COMMENT 'cf_long_prefix',
index id2_id4 (id2, id4) COMMENT 'cf_long_prefix',
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'cf_long_prefix',
index id3_id2 (id3, id2) COMMENT 'cf_long_prefix'
) engine=ROCKSDB;
create or replace table t2 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id4) COMMENT 'cf_long_prefix',
index id2 (id2) COMMENT 'cf_long_prefix',
index id2_id3 (id2, id3) COMMENT 'cf_long_prefix',
index id2_id4 (id2, id4) COMMENT 'cf_long_prefix',
index id2_id4_id5 (id2, id4, id5) COMMENT 'cf_long_prefix',
index id3_id4 (id3, id4) COMMENT 'cf_long_prefix',
index id3_id5 (id3, id5) COMMENT 'cf_long_prefix'
) engine=ROCKSDB;
insert t1
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
  from seq_1_to_10000;
insert t2 select * from t1;
set global rocksdb_force_flush_memtable_now=1;
call bloom_start();
select count(*) from t1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(PRIMARY) where id1 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1) where id2 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index(id3_id4) where id3 >= '1';
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=2 and id1=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=24 and id1=12;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=88 and id1=44;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=100 and id1=50;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=428 and id1=214;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=1 and id4=1 and id5=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=23 and id4=115 and id5=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=500 and id4=2500 and id5=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=601 and id4=3005 and id5=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=1 and id3='1' and id1=1 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36 and id3='36' and id1=18 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124' and id1=62 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=888 and id3='888' and id1=444 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1 and id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=12 and id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=1;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=12;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=23;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=100;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=234;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=234;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=1 and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=23 and id4=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=500 and id4=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=601 and id4=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='100' and id5=500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='240' and id5=1200;
count(*)
1
call bloom_end();
checked
false
create or replace table t1 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id1, id2, id3, id4) COMMENT 'rev:cf_long_prefix',
index id2 (id2) COMMENT 'rev:cf_long_prefix',
index id2_id1 (id2, id1) COMMENT 'rev:cf_long_prefix',
index id2_id3 (id2, id3) COMMENT 'rev:cf_long_prefix',
index id2_id4 (id2, id4) COMMENT 'rev:cf_long_prefix',
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'rev:cf_long_prefix',
index id3_id2 (id3, id2) COMMENT 'rev:cf_long_prefix'
) engine=ROCKSDB;
create or replace table t2 (
id1 bigint not null,
id2 bigint not null,
id3 varchar(100) not null,
id4 int not null,
id5 int not null,
value bigint,
value2 varchar(100),
primary key (id4) COMMENT 'rev:cf_long_prefix',
index id2 (id2) COMMENT 'rev:cf_long_prefix',
index id2_id3 (id2, id3) COMMENT 'rev:cf_long_prefix',
index id2_id4 (id2, id4) COMMENT 'rev:cf_long_prefix',
index id2_id4_id5 (id2, id4, id5) COMMENT 'rev:cf_long_prefix',
index id3_id4 (id3, id4) COMMENT 'rev:cf_long_prefix',
index id3_id5 (id3, id5) COMMENT 'rev:cf_long_prefix'
) engine=ROCKSDB;
insert t1
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
  from seq_1_to_10000;
insert t2 select * from t1;
set global rocksdb_force_flush_memtable_now=1;
call bloom_start();
select count(*) from t1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(PRIMARY) where id1 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1) where id2 >= 1;
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index(id3_id4) where id3 >= '1';
count(*)
10000
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=2 and id1=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=24 and id1=12;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=88 and id1=44;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=100 and id1=50;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index(id2_id1)  where id2=428 and id1=214;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=1 and id4=1 and id5=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=23 and id4=115 and id5=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=500 and id4=2500 and id5=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4_id5) where id2=601 and id4=3005 and id5=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id4) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=1 and id3='1' and id1=1 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36 and id3='36' and id1=18 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124' and id1=62 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=888 and id3='888' and id1=444 order by id4;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=124 and id3='124';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=1 and id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2_id3) where id2=12 and id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=1 and id3='1';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id3_id2) where id2=23 and id3='23';
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=1;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=12;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=23;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=100;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (PRIMARY) where id1=234;
count(*)
10
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=36;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2_id3_id1_id4) where id2=234;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=1 and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=23 and id4=115;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=500 and id4=2500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id2) where id2=601 and id4=3005;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='1' and id4=1;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id4) where id3='12' and id4=60;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=1;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=23;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=345;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t1 force index (id2) where id2=456;
count(*)
5
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='100' and id5=500;
count(*)
1
call bloom_end();
checked
false
call bloom_start();
select count(*) from t2 force index (id3_id5) where id3='240' and id5=1200;
count(*)
1
call bloom_end();
checked
false
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;
call bloom_start();
select * from r1 where id1=1 and id2 in (1) order by id3 asc;
id1	id2	id3	v1	v2
1	1	1	1	1
call bloom_end();
checked
false
call bloom_start();
select * from r1 where id1=1 and id2 in (1) order by id3 desc;
id1	id2	id3	v1	v2
1	1	1	1	1
call bloom_end();
checked
false
DROP PROCEDURE bloom_start;
DROP PROCEDURE bloom_end;
truncate table t1;
optimize table t1;
Table	Op	Msg_type	Msg_text
test.t1	optimize	status	OK
truncate table t2;
optimize table t2;
Table	Op	Msg_type	Msg_text
test.t2	optimize	status	OK
drop table if exists t1;
drop table if exists t2;
drop table if exists r1;
