Commit f011f45b authored by joel9001's avatar joel9001

#268 Adding bulk fetch MTR test and result files

parent 880fac82
set default_storage_engine='tokudb';
drop table if exists t,t1,t2,t3;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
CREATE TABLE `t2` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY HASH (num)
PARTITIONS 8 as select * from t;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
1
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
1
drop table t,t1,t2;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
1
drop table t,t1;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
CREATE TABLE `t2` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY RANGE (num)
(PARTITION p0 VALUES LESS THAN (1000000),
PARTITION p1 VALUES LESS THAN (2000000),
PARTITION p2 VALUES LESS THAN (3000000),
PARTITION p3 VALUES LESS THAN (4000000),
PARTITION p4 VALUES LESS THAN (5000000),
PARTITION p5 VALUES LESS THAN (6000000),
PARTITION p6 VALUES LESS THAN (7000000),
PARTITION p7 VALUES LESS THAN MAXVALUE) as select * from t;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
count(*)
8388608
DROP TABLE t3;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
1
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
DROP TABLE t3;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
1
drop table t,t1,t2;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
1
drop table t,t1;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
CREATE TABLE `t2` (
`num` int(10) unsigned auto_increment NOT NULL,
`count` bigint(20) NOT NULL,
UNIQUE (num)
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
1
drop table t,t1,t2;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
1
drop table t,t1,t2;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
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
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
INSERT IGNORE into t2 SELECT count(*) from t1;
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
1
drop table t,t1,t2;
set default_storage_engine='tokudb';
drop table if exists t,t1,t2,t3;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
count(*)
8388608
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
CREATE TABLE `t2` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY HASH (num)
PARTITIONS 8 as select * from t;
CREATE TABLE `t3` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY RANGE (num)
(PARTITION p0 VALUES LESS THAN (1000000),
PARTITION p1 VALUES LESS THAN (2000000),
PARTITION p2 VALUES LESS THAN (3000000),
PARTITION p3 VALUES LESS THAN (4000000),
PARTITION p4 VALUES LESS THAN (5000000),
PARTITION p5 VALUES LESS THAN (6000000),
PARTITION p6 VALUES LESS THAN (7000000),
PARTITION p7 VALUES LESS THAN MAXVALUE) as select * from t;
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
SELECT count(*) from t2;
count(*)
8388608
1
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t1;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
SELECT count(*) from t3;
count(*)
8388608
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
SELECT count(*) from t2 where num > 7000000;
count(*)
1847274
1
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t1 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
SELECT count(*) from t3 where num > 7000000;
count(*)
1847274
1
drop table t,t1,t2,t3;
# Verify that index and range scans are not slow
# on tables during create select statements
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
source include/have_partition.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2,t3;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create base table (control table) from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
# Create source hash partitioned table from source table t
CREATE TABLE `t2` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY HASH (num)
PARTITIONS 8 as select * from t;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
DROP TABLE t3;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t3;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
# Additionally, it is important to note that 1.5 is the multiplier applied to the time_elapsed_select
# value because it appears that MySQL 5.5.39 uses a sorted index scan during the create select statement
# while Percona Server 5.6 uses an unsorted index scan.
# The issue has been resolved in MySQL 5.6 but still persists in Maria 10.0.12
# in the defect found at https://mariadb.atlassian.net/browse/MDEV-6547.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= 1.5 * $time_elapsed_select`;
echo $verdict;
if (!$verdict) { echo index scan t2 $time_elapsed_create_select $time_elapsed_select; }
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t3;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
CREATE TABLE t3 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t3;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
# Additionally, it is important to note that 1.5 is the multiplier applied to the time_elapsed_select
# value because it appears that MySQL 5.5.39 uses a sorted index scan during the create select statement
# while Percona Server 5.6 uses an unsorted index scan.
# The issue has been resolved in MySQL 5.6 but still persists in Maria 10.0.12
# in the defect found at https://mariadb.atlassian.net/browse/MDEV-6547.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= 1.5 * $time_elapsed_select`;
echo $verdict;
if (!$verdict) { echo range scan t2 $time_elapsed_create_select $time_elapsed_select; }
drop table t,t1,t2;
# Verify that index and range scans are not slow
# on tables during create select statements
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create first table from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
drop table t,t1;
# Verify that index and range scans are not slow
# on tables during create select statements
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
source include/have_partition.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create base table (control table) from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
# Create source range partitioned table from source table t
CREATE TABLE `t2` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY RANGE (num)
(PARTITION p0 VALUES LESS THAN (1000000),
PARTITION p1 VALUES LESS THAN (2000000),
PARTITION p2 VALUES LESS THAN (3000000),
PARTITION p3 VALUES LESS THAN (4000000),
PARTITION p4 VALUES LESS THAN (5000000),
PARTITION p5 VALUES LESS THAN (6000000),
PARTITION p6 VALUES LESS THAN (7000000),
PARTITION p7 VALUES LESS THAN MAXVALUE) as select * from t;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1;
DROP TABLE t3;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t4;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t3;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
CREATE TABLE t4 AS SELECT count(*) from t2 where num > 7000000;
DROP TABLE t4;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
drop table t,t1,t2;
# Verify that index and range scans are not slow
# on temporary tables during create select statements
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create first table from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
DROP TEMPORARY TABLE t2;
inc $i;
}
let $time_elapsed_create_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_create_select seconds.;
# This check evaluates whether the time elapsed during the create select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
drop table t,t1;
# Verify that index and range scans are not slow
# on tables during insert select on duplicate key statements
# due to tokudb bulk fetch not being used.
# In this test case, the on duplicate key condition does not need to fire
# since the performance of the embedded select statement is all we are measuring.
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create first table from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
# Create second table t2 that will serve as the target for the insert select statment
CREATE TABLE `t2` (
`num` int(10) unsigned auto_increment NOT NULL,
`count` bigint(20) NOT NULL,
UNIQUE (num)
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
inc $i;
}
let $time_elapsed_insert_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_insert_select seconds.;
# This check evaluates whether the time elapsed during the insert select on duplicate key statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_insert_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 7000000 on DUPLICATE KEY UPDATE count=count+1;
inc $i;
}
let $time_elapsed_insert_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_insert_select seconds.;
# This check evaluates whether the time elapsed during the insert select on duplicate key statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_insert_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
enable_warnings;
drop table t,t1,t2;
# Verify that index and range scans are not slow
# on tables during insert select statements
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create first table from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
# Create second table t2 that will serve as the target for the insert select statment
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
INSERT into t2 SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_insert_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_insert_select seconds.;
# This check evaluates whether the time elapsed during the insert select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_insert_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# This check evaluates whether the time elapsed during the insert select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
#echo Range scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
INSERT into t2 SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_insert_select = `select to_seconds(now()) - $s`;
# This check evaluates whether the time elapsed during the insert select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
#echo Range scans took $time_elapsed_insert_select seconds.;
# This check evaluates whether the time elapsed during the insert select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_insert_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
drop table t,t1,t2;
# Verify that index and range scans are not slow
# on tables during replace select and insert ignore statements
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create first table from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
# Create second table t2 that will serve as the target for the replace select statment
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
REPLACE into t2 SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_replace_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_replace_select seconds.;
# This check evaluates whether the time elapsed during the replace select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_replace_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
##############################################################
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
INSERT IGNORE into t2 SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_insert_ignore_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_insert_ignore_select seconds.;
# This check evaluates whether the time elapsed during the insert ignore select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_insert_ignore_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
##################################################################
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
REPLACE into t2 SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_replace_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_replace_select seconds.;
# This check evaluates whether the time elapsed during the replace select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_replace_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
####################################################################
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
INSERT IGNORE into t2 SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_insert_ignore_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Range scans took $time_elapsed_insert_ignore_select seconds.;
# This check evaluates whether the time elapsed during the insert ignore select statement is on par
# with the select statement, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_insert_ignore_select - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
#########################################################################
drop table t,t1,t2;
# Verify that index and range scans are not slow
# on tables during create select statements
# against hash and range partitioned tables
# due to tokudb bulk fetch not being used
source include/have_tokudb.inc;
source include/have_partition.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t,t1,t2,t3;
enable_warnings;
let $maxq = 10;
CREATE TABLE `t` (
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
);
# put 8M rows into t
INSERT INTO t values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t;
# Create first table from source table t
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) as select * from t;
# Create second table from source table t
CREATE TABLE `t2` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY HASH (num)
PARTITIONS 8 as select * from t;
# Create third table from source table t;
CREATE TABLE `t3` (
`num` int(10) unsigned NOT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
) PARTITION BY RANGE (num)
(PARTITION p0 VALUES LESS THAN (1000000),
PARTITION p1 VALUES LESS THAN (2000000),
PARTITION p2 VALUES LESS THAN (3000000),
PARTITION p3 VALUES LESS THAN (4000000),
PARTITION p4 VALUES LESS THAN (5000000),
PARTITION p5 VALUES LESS THAN (6000000),
PARTITION p6 VALUES LESS THAN (7000000),
PARTITION p7 VALUES LESS THAN MAXVALUE) as select * from t;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
# echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t2;
inc $i;
}
let $time_elapsed_select_hash = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
# echo Index scans took $time_elapsed_select_hash seconds.;
# This check evaluates whether the time elapsed during the select statement
# against a hashed partition table is on par with the select statment
# against a non-partitioned table, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_select_hash - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
if (!$verdict) { echo index scan t2 $time_elapsed_select_hash $time_elapsed_select; }
######################################################################
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t1;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxq) {
SELECT count(*) from t3;
inc $i;
}
let $time_elapsed_select_range = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select_range seconds.;
# This check evaluates whether the time elapsed during the select statement
# against a range partition table is on par with the select statment
# against a non-partitioned table, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_select_range - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
if (!$verdict) { echo index scan t3 $time_elapsed_select_range $time_elapsed_select; }
#########################################################################
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t2 where num > 7000000;
inc $i;
}
let $time_elapsed_select_hash = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select_hash seconds.;
# This check evaluates whether the time elapsed during the select statement
# against a hash partition table is on par with the select statment
# against a non-partitioned table, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_select_hash - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
if (!$verdict) { echo range scan t2 $time_elapsed_select_hash $time_elapsed_select; }
#########################################################################
let $maxrq = 30;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t1 where num > 7000000;
inc $i;
}
let $time_elapsed_select = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select seconds.;
let $s = `select to_seconds(now())`;
let $i = 0;
while ($i < $maxrq) {
SELECT count(*) from t3 where num > 7000000;
inc $i;
}
let $time_elapsed_select_range = `select to_seconds(now()) - $s`;
# The following line can be used to display the time elapsed data
# which could be useful for debugging.
#echo Index scans took $time_elapsed_select_range seconds.;
# This check evaluates whether the time elapsed during the select statement
# against a range partition table is on par with the select statment
# against a non-partitioned table, which will confirm that bulk fetch is in fact being used.
let $verdict = `select abs($time_elapsed_select_range - $time_elapsed_select) <= $time_elapsed_select`;
echo $verdict;
if (!$verdict) { echo range scan t3 $time_elapsed_select_range $time_elapsed_select; }
drop table t,t1,t2,t3;
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