set default_storage_engine='tokudb';
drop table if exists t1,t2;
CREATE TABLE `t1` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
);
INSERT INTO t1 values (null,null);
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) FROM t1;
count(*)
1048576
set tokudb_bulk_fetch=ON;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
set tokudb_bulk_fetch=OFF;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
1
set tokudb_bulk_fetch=ON;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
set tokudb_bulk_fetch=OFF;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
1
drop table t1,t2;
