Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ccd49929
Commit
ccd49929
authored
Sep 29, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB-724 speed up and simplify the bulk fetch tests
parent
19993a53
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1579 additions
and
2454 deletions
+1579
-2454
mysql-test/suite/tokudb/r/bf_create_select.result
mysql-test/suite/tokudb/r/bf_create_select.result
+141
-185
mysql-test/suite/tokudb/r/bf_create_select_hash_part.result
mysql-test/suite/tokudb/r/bf_create_select_hash_part.result
+192
-322
mysql-test/suite/tokudb/r/bf_create_select_range_part.result
mysql-test/suite/tokudb/r/bf_create_select_range_part.result
+199
-328
mysql-test/suite/tokudb/r/bf_create_temp_select.result
mysql-test/suite/tokudb/r/bf_create_temp_select.result
+181
-225
mysql-test/suite/tokudb/r/bf_insert_select.result
mysql-test/suite/tokudb/r/bf_insert_select.result
+102
-186
mysql-test/suite/tokudb/r/bf_insert_select_dup_key.result
mysql-test/suite/tokudb/r/bf_insert_select_dup_key.result
+102
-186
mysql-test/suite/tokudb/r/bf_replace_select.result
mysql-test/suite/tokudb/r/bf_replace_select.result
+102
-348
mysql-test/suite/tokudb/r/bf_select_range_part.result
mysql-test/suite/tokudb/r/bf_select_range_part.result
+120
-0
mysql-test/suite/tokudb/t/bf_create_select.test
mysql-test/suite/tokudb/t/bf_create_select.test
+57
-72
mysql-test/suite/tokudb/t/bf_create_select_hash_part.test
mysql-test/suite/tokudb/t/bf_create_select_hash_part.test
+64
-105
mysql-test/suite/tokudb/t/bf_create_select_range_part.test
mysql-test/suite/tokudb/t/bf_create_select_range_part.test
+70
-99
mysql-test/suite/tokudb/t/bf_create_temp_select.test
mysql-test/suite/tokudb/t/bf_create_temp_select.test
+60
-75
mysql-test/suite/tokudb/t/bf_delete.test
mysql-test/suite/tokudb/t/bf_delete.test
+9
-6
mysql-test/suite/tokudb/t/bf_insert_select.test
mysql-test/suite/tokudb/t/bf_insert_select.test
+56
-78
mysql-test/suite/tokudb/t/bf_insert_select_dup_key.test
mysql-test/suite/tokudb/t/bf_insert_select_dup_key.test
+55
-77
mysql-test/suite/tokudb/t/bf_replace_select.test
mysql-test/suite/tokudb/t/bf_replace_select.test
+56
-146
mysql-test/suite/tokudb/t/bf_select_hash_part.test
mysql-test/suite/tokudb/t/bf_select_hash_part.test
+6
-4
mysql-test/suite/tokudb/t/bf_select_range_part.test
mysql-test/suite/tokudb/t/bf_select_range_part.test
+7
-12
No files found.
mysql-test/suite/tokudb/r/bf_create_select.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t
,t
1,t2;
drop table if exists t1,t2;
CREATE TABLE `t` (
CREATE TABLE `t
1
` (
`num` int(10) unsigned auto_increment NOT NULL,
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
PRIMARY KEY (`num`)
);
);
INSERT INTO t values (null,null);
INSERT INTO t1 values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t1;
INSERT INTO t SELECT null,val FROM t;
count(*)
INSERT INTO t SELECT null,val FROM t;
1048576
SELECT count(*) FROM t;
set tokudb_bulk_fetch=ON;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
CREATE TABLE `t1` (
CREATE TABLE t2 AS SELECT count(*) from t1;
`num` int(10) unsigned NOT NULL,
DROP TABLE t2;
`val` varchar(32) DEFAULT NULL,
CREATE TABLE t2 AS SELECT count(*) from t1;
PRIMARY KEY (`num`)
DROP TABLE t2;
) as select * from t;
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
set tokudb_bulk_fetch=OFF;
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;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
...
@@ -88,155 +72,127 @@ DROP TABLE t2;
...
@@ -88,155 +72,127 @@ DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
DROP TABLE t2;
1
1
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=ON;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
set tokudb_bulk_fetch=OFF;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
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;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000
0
;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t2;
DROP TABLE t2;
1
1
drop table t
,t
1;
drop table t1;
mysql-test/suite/tokudb/r/bf_create_select_hash_part.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t,t1,t2,t3;
drop table if exists 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` (
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`num` int(10) unsigned auto_increment 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,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
PRIMARY KEY (`num`)
) PARTITION BY HASH (num)
) PARTITION BY HASH (num) PARTITIONS 8;
PARTITIONS 8 as select * from t;
INSERT INTO t1 values (null,null);
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
SELECT count(*) FROM t1;
SELECT count(*) from t1;
count(*)
count(*)
1048576
8388608
set tokudb_bulk_fetch=ON;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE t3 AS SELECT count(*) from t2;
set tokudb_bulk_fetch=OFF;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t3 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t3;
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;
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
1
CREATE TABLE `t3` (`x` bigint);
set tokudb_bulk_fetch=ON;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=OFF;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
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
1
drop table t
,t1,t2
;
drop table t
1
;
mysql-test/suite/tokudb/r/bf_create_select_range_part.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t,t1,t2;
drop table if exists 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` (
CREATE TABLE `t1` (
`num` int(10) unsigned NOT NULL,
`num` int(10) unsigned auto_increment 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,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
PRIMARY KEY (`num`)
) PARTITION BY RANGE (num)
) PARTITION BY RANGE (num)
(PARTITION p0 VALUES LESS THAN (1000000),
(PARTITION p0 VALUES LESS THAN (100000),
PARTITION p1 VALUES LESS THAN (2000000),
PARTITION p1 VALUES LESS THAN (200000),
PARTITION p2 VALUES LESS THAN (3000000),
PARTITION p2 VALUES LESS THAN (300000),
PARTITION p3 VALUES LESS THAN (4000000),
PARTITION p3 VALUES LESS THAN (400000),
PARTITION p4 VALUES LESS THAN (5000000),
PARTITION p4 VALUES LESS THAN (500000),
PARTITION p5 VALUES LESS THAN (6000000),
PARTITION p5 VALUES LESS THAN (600000),
PARTITION p6 VALUES LESS THAN (7000000),
PARTITION p6 VALUES LESS THAN (700000),
PARTITION p7 VALUES LESS THAN MAXVALUE) as select * from t;
PARTITION p7 VALUES LESS THAN MAXVALUE);
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 values (null,null);
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
DROP TABLE t3;
INSERT INTO t1 SELECT null,val FROM t1;
CREATE TABLE `t3` (`x` bigint);
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
SELECT count(*) FROM t1;
count(*)
count(*)
8388608
1048576
DROP TABLE t3;
set tokudb_bulk_fetch=ON;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
8388608
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
CREATE TABLE t2 AS SELECT count(*) from t1;
CREATE TABLE t4 AS SELECT count(*) from t2;
DROP TABLE t2;
DROP TABLE t4;
set tokudb_bulk_fetch=OFF;
CREATE TABLE t4 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t4;
DROP TABLE t2;
CREATE TABLE t4 AS SELECT count(*) from t2;
CREATE TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t4;
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;
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
1
CREATE TABLE `t3` (`x` bigint);
set tokudb_bulk_fetch=ON;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=OFF;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
CREATE TABLE `t3` (`x` bigint);
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TABLE t3;
DROP TABLE t2;
CREATE TABLE `t3` (`x` bigint);
CREATE TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
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
1
drop table t
,t1,t2
;
drop table t
1
;
mysql-test/suite/tokudb/r/bf_create_temp_select.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t
,t
1,t2;
drop table if exists t1,t2;
CREATE TABLE `t` (
CREATE TABLE `t
1
` (
`num` int(10) unsigned auto_increment NOT NULL,
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
PRIMARY KEY (`num`)
);
);
INSERT INTO t values (null,null);
INSERT INTO t1 values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t1;
INSERT INTO t SELECT null,val FROM t;
count(*)
INSERT INTO t SELECT null,val FROM t;
1048576
SELECT count(*) FROM t;
set tokudb_bulk_fetch=ON;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
CREATE TABLE `t1` (
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
`num` int(10) unsigned NOT NULL,
DROP TABLE t2;
`val` varchar(32) DEFAULT NULL,
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
PRIMARY KEY (`num`)
DROP TABLE t2;
) as select * from t;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
SELECT count(*) from t1;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
8388608
DROP TABLE t2;
SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
count(*)
DROP TABLE t2;
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;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
set tokudb_bulk_fetch=OFF;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP T
EMPORARY T
ABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1;
DROP TABLE t2;
1
1
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=ON;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
set tokudb_bulk_fetch=OFF;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
count(*)
DROP TABLE t2;
1847274
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
DROP TABLE t2;
count(*)
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
1847274
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP TABLE t2;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 7000000;
CREATE TEMPORARY TABLE t2 AS SELECT count(*) from t1 where num > 700000;
DROP TEMPORARY TABLE t2;
DROP 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
1
drop table t
,t
1;
drop table t1;
mysql-test/suite/tokudb/r/bf_insert_select.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t
,t
1,t2;
drop table if exists t1,t2;
CREATE TABLE `t` (
CREATE TABLE `t
1
` (
`num` int(10) unsigned auto_increment NOT NULL,
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
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` (
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
`count` bigint(20) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
);
SELECT count(*) from t1;
INSERT INTO t1 values (null,null);
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
SELECT count(*) FROM t1;
count(*)
count(*)
8388608
1048576
SELECT count(*) from t1;
set tokudb_bulk_fetch=ON;
count(*)
INSERT into t2 SELECT count(*) from t1;
8388608
INSERT into t2 SELECT count(*) from t1;
SELECT count(*) from t1;
INSERT into t2 SELECT count(*) from t1;
count(*)
INSERT into t2 SELECT count(*) from t1;
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;
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;
set tokudb_bulk_fetch=OFF;
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;
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;
...
@@ -81,125 +75,47 @@ INSERT into t2 SELECT count(*) from t1;
...
@@ -81,125 +75,47 @@ 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
1
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=ON;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=OFF;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 SELECT count(*) from t1 where num > 700000;
count(*)
INSERT into t2 SELECT count(*) from t1 where num > 700000;
1847274
INSERT into t2 SELECT count(*) from t1 where num > 700000;
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
1
drop table t
,t
1,t2;
drop table t1,t2;
mysql-test/suite/tokudb/r/bf_insert_select_dup_key.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t
,t
1,t2;
drop table if exists t1,t2;
CREATE TABLE `t` (
CREATE TABLE `t
1
` (
`num` int(10) unsigned auto_increment NOT NULL,
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
PRIMARY KEY (`num`)
);
);
INSERT INTO t values (null,null);
INSERT INTO t1 values (null,null);
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
INSERT INTO t1 SELECT null,val FROM t1;
INSERT INTO t SELECT null,val FROM t;
SELECT count(*) FROM t1;
INSERT INTO t SELECT null,val FROM t;
count(*)
INSERT INTO t SELECT null,val FROM t;
1048576
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` (
CREATE TABLE `t2` (
`num` int(10) unsigned auto_increment NOT NULL,
`num` int(10) unsigned auto_increment NOT NULL,
`count` bigint(20) NOT NULL,
`count` bigint(20) NOT NULL,
UNIQUE (num)
UNIQUE (num)
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
);
SELECT count(*) from t1;
set tokudb_bulk_fetch=ON;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
set tokudb_bulk_fetch=OFF;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
8388608
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE count=count+1;
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;
...
@@ -83,125 +77,47 @@ INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE
...
@@ -83,125 +77,47 @@ INSERT into t2 (num,count) SELECT NULL,count(*) from t1 on DUPLICATE KEY UPDATE
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
1
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=ON;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
set tokudb_bulk_fetch=OFF;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
SELECT count(*) from t1 where num > 7000000;
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
count(*)
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+1;
1847274
INSERT into t2 (num,count) SELECT NULL,count(*) from t1 where num > 700000 on DUPLICATE KEY UPDATE count=count+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
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
1
drop table t
,t
1,t2;
drop table t1,t2;
mysql-test/suite/tokudb/r/bf_replace_select.result
View file @
ccd49929
set default_storage_engine='tokudb';
set default_storage_engine='tokudb';
drop table if exists t
,t
1,t2;
drop table if exists t1,t2;
CREATE TABLE `t` (
CREATE TABLE `t
1
` (
`num` int(10) unsigned auto_increment NOT NULL,
`num` int(10) unsigned auto_increment NOT NULL,
`val` varchar(32) DEFAULT NULL,
`val` varchar(32) DEFAULT NULL,
PRIMARY KEY (`num`)
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` (
CREATE TABLE `t2` (
`count` bigint(20) NOT NULL
`count` bigint(20) NOT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1;
);
SELECT count(*) from t1;
INSERT INTO t1 values (null,null);
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
INSERT INTO t1 SELECT null,val FROM t1;
count(*)
INSERT INTO t1 SELECT null,val FROM t1;
8388608
INSERT INTO t1 SELECT null,val FROM t1;
SELECT count(*) from t1;
SELECT count(*) FROM t1;
count(*)
count(*)
8388608
1048576
SELECT count(*) from t1;
set tokudb_bulk_fetch=ON;
count(*)
REPLACE into t2 SELECT count(*) from t1;
8388608
REPLACE into t2 SELECT count(*) from t1;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
count(*)
REPLACE into t2 SELECT count(*) from t1;
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;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
set tokudb_bulk_fetch=OFF;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1;
...
@@ -81,287 +75,47 @@ REPLACE into t2 SELECT count(*) from t1;
...
@@ -81,287 +75,47 @@ 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
1
SELECT count(*) from t1;
set tokudb_bulk_fetch=ON;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
set tokudb_bulk_fetch=OFF;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
count(*)
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
8388608
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
INSERT IGNORE into t2 SELECT count(*) from t1;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
1
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
SELECT count(*) from t1 where num > 7000000;
REPLACE into t2 SELECT count(*) from t1 where num > 700000;
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
1
drop table t
,t
1,t2;
drop table t1,t2;
mysql-test/suite/tokudb/r/bf_select_range_part.result
View file @
ccd49929
...
@@ -98,6 +98,36 @@ count(*)
...
@@ -98,6 +98,36 @@ count(*)
SELECT count(*) from t;
SELECT count(*) from t;
count(*)
count(*)
1048576
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
set tokudb_bulk_fetch=OFF;
set tokudb_bulk_fetch=OFF;
SELECT count(*) from t;
SELECT count(*) from t;
count(*)
count(*)
...
@@ -159,6 +189,36 @@ count(*)
...
@@ -159,6 +189,36 @@ count(*)
SELECT count(*) from t;
SELECT count(*) from t;
count(*)
count(*)
1048576
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
SELECT count(*) from t;
count(*)
1048576
1
1
set tokudb_bulk_fetch=ON;
set tokudb_bulk_fetch=ON;
SELECT count(*) from t where num > 700000;
SELECT count(*) from t where num > 700000;
...
@@ -221,6 +281,36 @@ count(*)
...
@@ -221,6 +281,36 @@ count(*)
SELECT count(*) from t where num > 700000;
SELECT count(*) from t where num > 700000;
count(*)
count(*)
348576
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
set tokudb_bulk_fetch=OFF;
set tokudb_bulk_fetch=OFF;
SELECT count(*) from t where num > 700000;
SELECT count(*) from t where num > 700000;
count(*)
count(*)
...
@@ -282,5 +372,35 @@ count(*)
...
@@ -282,5 +372,35 @@ count(*)
SELECT count(*) from t where num > 700000;
SELECT count(*) from t where num > 700000;
count(*)
count(*)
348576
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
SELECT count(*) from t where num > 700000;
count(*)
348576
1
1
drop table t;
drop table t;
mysql-test/suite/tokudb/t/bf_create_select.test
View file @
ccd49929
...
@@ -6,64 +6,56 @@ source include/have_tokudb.inc;
...
@@ -6,64 +6,56 @@ source include/have_tokudb.inc;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t
1
,
t2
;
drop
table
if
exists
t1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$
maxq
=
1
0
;
let
$
debug
=
0
;
CREATE
TABLE
`t`
(
CREATE
TABLE
`t
1
`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
PRIMARY
KEY
(
`num`
)
);
);
# put 8M rows into t
# put 1M rows into t1
INSERT
INTO
t
values
(
null
,
null
);
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
SELECT
count
(
*
)
FROM
t1
;
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
$maxq
=
10
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
;
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $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())`
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
...
@@ -71,48 +63,41 @@ while ($i < $maxq) {
...
@@ -71,48 +63,41 @@ while ($i < $maxq) {
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
# Check that the time with bulk fetch off is at least twice that whith bulk fetch on
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
let
$verdict
=
`select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_on
$time_elapsed_off
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_on
$time_elapsed_off
;
}
let
$max
r
q
=
30
;
let
$maxq
=
30
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxrq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
where
num
>
7000000
;
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
set
tokudb_bulk_fetch
=
OFF
;
# which could be useful for debugging.
let
$s
=
`select unix_timestamp()`
;
#echo Index scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
0
;
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
DROP
TABLE
t2
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
# Check that the time with bulk fetch off is at least twice that whith bulk fetch on
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
let
$verdict
=
`select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_on
$time_elapsed_off
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_on
$time_elapsed_off
;
}
drop
table
t
,
t
1
;
drop
table
t1
;
mysql-test/suite/tokudb/t/bf_create_select_hash_part.test
View file @
ccd49929
...
@@ -7,137 +7,96 @@ source include/have_partition.inc;
...
@@ -7,137 +7,96 @@ source include/have_partition.inc;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t1
,
t2
,
t3
;
drop
table
if
exists
t
1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$maxq
=
10
;
let
$debug
=
0
;
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 source hash partitioned table from source table t
CREATE
TABLE
`t
2
`
(
CREATE
TABLE
`t
1
`
(
`num`
int
(
10
)
unsigned
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
PRIMARY
KEY
(
`num`
)
)
PARTITION
BY
HASH
(
num
)
)
PARTITION
BY
HASH
(
num
)
PARTITIONS
8
;
PARTITIONS
8
as
select
*
from
t
;
# put 1M rows into t1
let
$s
=
`select to_seconds(now())`
;
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
SELECT
count
(
*
)
FROM
t1
;
let
$maxq
=
20
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
`t3`
(
`x`
bigint
);
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
SELECT
count
(
*
)
from
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_on
=
`select unix_timestamp() - $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())`
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
t
3
AS
SELECT
count
(
*
)
from
t2
;
CREATE
TABLE
t
2
AS
SELECT
count
(
*
)
from
t1
;
DROP
TABLE
t
3
;
DROP
TABLE
t
2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_off
=
`select unix_timestamp() - $s`
;
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
# check that bulk fetch on is at least 2 times faster than bulk fetch off
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
# 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
;
echo
$verdict
;
if
(
!
$verdict
)
{
echo
index
scan
t2
$time_elapsed_create_select
$time_elapsed_select
;
}
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_off
$time_elapsed_on
;
}
let
$max
rq
=
3
0
;
let
$max
q
=
2
0
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxrq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
`t3`
(
`x`
bigint
);
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
SELECT
count
(
*
)
from
t1
where
num
>
7000000
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_on
=
`select unix_timestamp() - $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())`
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
t
3
AS
SELECT
count
(
*
)
from
t2
where
num
>
70
00000
;
CREATE
TABLE
t
2
AS
SELECT
count
(
*
)
from
t1
where
num
>
7
00000
;
DROP
TABLE
t
3
;
DROP
TABLE
t
2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_off
=
`select unix_timestamp() - $s`
;
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
# check that bulk fetch on is at least 2 times faster than bulk fetch off
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
# 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
;
echo
$verdict
;
if
(
!
$verdict
)
{
echo
range
scan
t2
$time_elapsed_create_select
$time_elapsed_select
;
}
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_off
$time_elapsed_on
;
}
drop
table
t
,
t1
,
t2
;
drop
table
t
1
;
mysql-test/suite/tokudb/t/bf_create_select_range_part.test
View file @
ccd49929
...
@@ -7,132 +7,103 @@ source include/have_partition.inc;
...
@@ -7,132 +7,103 @@ source include/have_partition.inc;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t
1
,
t2
;
drop
table
if
exists
t1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$
maxq
=
1
0
;
let
$
debug
=
0
;
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`
(
CREATE
TABLE
`t1`
(
`num`
int
(
10
)
unsigned
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
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
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
PRIMARY
KEY
(
`num`
)
)
PARTITION
BY
RANGE
(
num
)
)
PARTITION
BY
RANGE
(
num
)
(
PARTITION
p0
VALUES
LESS
THAN
(
1000000
),
(
PARTITION
p0
VALUES
LESS
THAN
(
100000
),
PARTITION
p1
VALUES
LESS
THAN
(
2000000
),
PARTITION
p1
VALUES
LESS
THAN
(
200000
),
PARTITION
p2
VALUES
LESS
THAN
(
3000000
),
PARTITION
p2
VALUES
LESS
THAN
(
300000
),
PARTITION
p3
VALUES
LESS
THAN
(
4000000
),
PARTITION
p3
VALUES
LESS
THAN
(
400000
),
PARTITION
p4
VALUES
LESS
THAN
(
5000000
),
PARTITION
p4
VALUES
LESS
THAN
(
500000
),
PARTITION
p5
VALUES
LESS
THAN
(
6000000
),
PARTITION
p5
VALUES
LESS
THAN
(
600000
),
PARTITION
p6
VALUES
LESS
THAN
(
7000000
),
PARTITION
p6
VALUES
LESS
THAN
(
700000
),
PARTITION
p7
VALUES
LESS
THAN
MAXVALUE
)
as
select
*
from
t
;
PARTITION
p7
VALUES
LESS
THAN
MAXVALUE
);
let
$s
=
`select to_seconds(now())`
;
# put 1M rows into t1
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
SELECT
count
(
*
)
FROM
t1
;
let
$maxq
=
20
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
`t3`
(
`x`
bigint
);
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
SELECT
count
(
*
)
from
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_on
=
`select unix_timestamp() - $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())`
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
t
4
AS
SELECT
count
(
*
)
from
t2
;
CREATE
TABLE
t
2
AS
SELECT
count
(
*
)
from
t1
;
DROP
TABLE
t
4
;
DROP
TABLE
t
2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_off
=
`select unix_timestamp() - $s`
;
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
# check that bulk fetch on is at least 2 times faster than bulk fetch off
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
# 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
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_off
$time_elapsed_on
;
}
let
$max
rq
=
3
0
;
let
$max
q
=
2
0
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxrq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
`t3`
(
`x`
bigint
);
CREATE
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
SELECT
count
(
*
)
from
t1
where
num
>
7000000
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
set
tokudb_bulk_fetch
=
OFF
;
# which could be useful for debugging.
let
$s
=
`select unix_timestamp()`
;
#echo Index scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
CREATE
TABLE
t
4
AS
SELECT
count
(
*
)
from
t2
where
num
>
70
00000
;
CREATE
TABLE
t
2
AS
SELECT
count
(
*
)
from
t1
where
num
>
7
00000
;
DROP
TABLE
t
4
;
DROP
TABLE
t
2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_off
=
`select unix_timestamp() - $s`
;
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
# check that bulk fetch on is at least 2 times faster than bulk fetch off
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
# 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
;
echo
$verdict
;
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_off
$time_elapsed_on
;
}
drop
table
t
,
t1
,
t2
;
drop
table
t
1
;
mysql-test/suite/tokudb/t/bf_create_temp_select.test
View file @
ccd49929
# Verify that index and range scans are not slow
# Verify that index and range scans are not slow
# on t
emporary t
ables during create select statements
# on tables during create select statements
# due to tokudb bulk fetch not being used
# due to tokudb bulk fetch not being used
source
include
/
have_tokudb
.
inc
;
source
include
/
have_tokudb
.
inc
;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t
1
,
t2
;
drop
table
if
exists
t1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$
maxq
=
1
0
;
let
$
debug
=
0
;
CREATE
TABLE
`t`
(
CREATE
TABLE
`t
1
`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
PRIMARY
KEY
(
`num`
)
);
);
# put 8M rows into t
# put 1M rows into t1
INSERT
INTO
t
values
(
null
,
null
);
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
SELECT
count
(
*
)
FROM
t1
;
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
let
$maxq
=
10
;
CREATE
TABLE
`t1`
(
`num`
int
(
10
)
unsigned
NOT
NULL
,
set
tokudb_bulk_fetch
=
ON
;
`val`
varchar
(
32
)
DEFAULT
NULL
,
let
$s
=
`select unix_timestamp()`
;
PRIMARY
KEY
(
`num`
)
)
as
select
*
from
t
;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
;
CREATE
TEMPORARY
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $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())`
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
CREATE
TEMPORARY
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
CREATE
TEMPORARY
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
;
DROP
T
EMPORARY
T
ABLE
t2
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
# Check that the time with bulk fetch off is at least twice that whith bulk fetch on
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
let
$verdict
=
`select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_on
$time_elapsed_off
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_on
$time_elapsed_off
;
}
let
$max
r
q
=
30
;
let
$maxq
=
30
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxrq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
where
num
>
7000000
;
CREATE
TEMPORARY
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
set
tokudb_bulk_fetch
=
OFF
;
# which could be useful for debugging.
let
$s
=
`select unix_timestamp()`
;
#echo Range scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
CREATE
TEMPORARY
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
0
;
CREATE
TEMPORARY
TABLE
t2
AS
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
DROP
T
EMPORARY
T
ABLE
t2
;
DROP
TABLE
t2
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_create_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
# Check that the time with bulk fetch off is at least twice that whith bulk fetch on
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
let
$verdict
=
`select abs($time_elapsed_create_select - $time_elapsed_select) <= $time_elapsed_select`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_on
$time_elapsed_off
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_on
$time_elapsed_off
;
}
drop
table
t
,
t
1
;
drop
table
t1
;
mysql-test/suite/tokudb/t/bf_delete.test
View file @
ccd49929
...
@@ -8,6 +8,8 @@ disable_warnings;
...
@@ -8,6 +8,8 @@ disable_warnings;
drop
table
if
exists
t
;
drop
table
if
exists
t
;
enable_warnings
;
enable_warnings
;
let
$debug
=
0
;
CREATE
TABLE
`t`
(
id
bigint
not
null
auto_increment
primary
key
,
val
bigint
not
null
default
0
);
CREATE
TABLE
`t`
(
id
bigint
not
null
auto_increment
primary
key
,
val
bigint
not
null
default
0
);
# put 8M rows into t
# put 8M rows into t
...
@@ -42,27 +44,28 @@ let $maxq = 10;
...
@@ -42,27 +44,28 @@ let $maxq = 10;
# measure the time to do $maxq deletes from t that affect no rows with bulk fetch ON
# measure the time to do $maxq deletes from t that affect no rows with bulk fetch ON
set
tokudb_bulk_fetch
=
ON
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select
to_seconds(now()
)`
;
let
$s
=
`select
unix_timestamp(
)`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
delete
from
t
where
val
>
0
;
delete
from
t
where
val
>
0
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_bf_on
=
`select
to_seconds(now()
) - $s`
;
let
$time_elapsed_bf_on
=
`select
unix_timestamp(
) - $s`
;
# measure the time to do $maxq deletes from t that affect no rows with bulk fetch OFF
# measure the time to do $maxq deletes from t that affect no rows with bulk fetch OFF
set
tokudb_bulk_fetch
=
OFF
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select
to_seconds(now()
)`
;
let
$s
=
`select
unix_timestamp(
)`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
delete
from
t
where
val
>
0
;
delete
from
t
where
val
>
0
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_bf_off
=
`select
to_seconds(now()
) - $s`
;
let
$time_elapsed_bf_off
=
`select
unix_timestamp(
) - $s`
;
# verify that a delete scan with bulk fetch ON is at least 2 times faster than with bulk fetch OFF
# verify that a delete scan with bulk fetch ON is at least 2 times faster than with bulk fetch OFF
let
$verdict
=
`select $time_elapsed_bf_o
ff > $time_elapsed_bf_on && ($time_elapsed_bf_off - $time_elapsed_bf_on) / $time_elapsed_bf_on >= 2
`
;
let
$verdict
=
`select $time_elapsed_bf_o
n > 0 && $time_elapsed_bf_off >= 2 * $time_elapsed_bf_on
`
;
echo
$verdict
;
echo
$verdict
;
if
(
!
$verdict
)
{
echo
$time_elapsed_bf_on
$time_elapsed_bf_off
;
}
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_bf_on
$time_elapsed_bf_off
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_bf_on
$time_elapsed_bf_off
;
}
drop
table
t
;
drop
table
t
;
mysql-test/suite/tokudb/t/bf_insert_select.test
View file @
ccd49929
...
@@ -6,117 +6,95 @@ source include/have_tokudb.inc;
...
@@ -6,117 +6,95 @@ source include/have_tokudb.inc;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t
1
,
t2
;
drop
table
if
exists
t1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$
maxq
=
1
0
;
let
$
debug
=
0
;
CREATE
TABLE
`t`
(
CREATE
TABLE
`t
1
`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
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 second table t2 that will serve as the target for the insert select statment
CREATE
TABLE
`t2`
(
CREATE
TABLE
`t2`
(
`count`
bigint
(
20
)
NOT
NULL
`count`
bigint
(
20
)
NOT
NULL
)
ENGINE
=
TokuDB
DEFAULT
CHARSET
=
latin1
;
);
let
$s
=
`select to_seconds(now())`
;
# put 1M rows into t1
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
SELECT
count
(
*
)
FROM
t1
;
let
$maxq
=
20
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
;
INSERT
into
t2
SELECT
count
(
*
)
from
t1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
set
tokudb_bulk_fetch
=
OFF
;
# which could be useful for debugging.
let
$s
=
`select unix_timestamp()`
;
#echo Index scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
INSERT
into
t2
SELECT
count
(
*
)
from
t1
;
INSERT
into
t2
SELECT
count
(
*
)
from
t1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
insert_select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
off
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
# check that bulk fetch on is at least 2 times faster than bulk fetch off
# which could be useful for debugging.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
#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
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_off
$time_elapsed_on
;
}
let
$max
rq
=
3
0
;
let
$max
q
=
2
0
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
where
num
>
70
00000
;
INSERT
into
t2
SELECT
count
(
*
)
from
t1
where
num
>
7
00000
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# This check evaluates whether the time elapsed during the insert select statement is on par
set
tokudb_bulk_fetch
=
OFF
;
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$s
=
`select unix_timestamp()`
;
#echo Range scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
INSERT
into
t2
SELECT
count
(
*
)
from
t1
where
num
>
700000
0
;
INSERT
into
t2
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_insert_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
# 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
;
echo
$verdict
;
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_off
$time_elapsed_on
;
}
drop
table
t
,
t
1
,
t2
;
drop
table
t1
,
t2
;
mysql-test/suite/tokudb/t/bf_insert_select_dup_key.test
View file @
ccd49929
...
@@ -8,120 +8,98 @@ source include/have_tokudb.inc;
...
@@ -8,120 +8,98 @@ source include/have_tokudb.inc;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t
1
,
t2
;
drop
table
if
exists
t1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$
maxq
=
1
0
;
let
$
debug
=
0
;
CREATE
TABLE
`t`
(
CREATE
TABLE
`t
1
`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
PRIMARY
KEY
(
`num`
)
);
);
# put 8M rows into t
# put 1M rows into t1
INSERT
INTO
t
values
(
null
,
null
);
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t
SELECT
null
,
val
FROM
t
;
SELECT
count
(
*
)
FROM
t1
;
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 second table t2 that will serve as the target for the insert select statment
CREATE
TABLE
`t2`
(
CREATE
TABLE
`t2`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`count`
bigint
(
20
)
NOT
NULL
,
`count`
bigint
(
20
)
NOT
NULL
,
UNIQUE
(
num
)
UNIQUE
(
num
)
)
ENGINE
=
TokuDB
DEFAULT
CHARSET
=
latin1
;
)
;
let
$maxq
=
20
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t
1
;
INSERT
into
t2
(
num
,
count
)
SELECT
NULL
,
count
(
*
)
from
t1
on
DUPLICATE
KEY
UPDATE
count
=
count
+
1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_on
=
`select unix_timestamp() - $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.;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select
to_seconds(now()
)`
;
let
$s
=
`select
unix_timestamp(
)`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
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
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_insert_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
# check that bulk fetch on is at least 2 times faster than bulk fetch off
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
let
$verdict
=
`select abs($time_elapsed_insert_select - $time_elapsed_select) <= $time_elapsed_select`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_off
$time_elapsed_on
;
}
let
$max
rq
=
3
0
;
let
$max
q
=
2
0
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
where
num
>
7000000
;
INSERT
into
t2
(
num
,
count
)
SELECT
NULL
,
count
(
*
)
from
t1
where
num
>
700000
on
DUPLICATE
KEY
UPDATE
count
=
count
+
1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_on
=
`select unix_timestamp() - $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.;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select
to_seconds(now()
)`
;
let
$s
=
`select
unix_timestamp(
)`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$max
r
q
)
{
while
(
$i
<
$maxq
)
{
INSERT
into
t2
(
num
,
count
)
SELECT
NULL
,
count
(
*
)
from
t1
where
num
>
700000
0
on
DUPLICATE
KEY
UPDATE
count
=
count
+
1
;
INSERT
into
t2
(
num
,
count
)
SELECT
NULL
,
count
(
*
)
from
t1
where
num
>
700000
on
DUPLICATE
KEY
UPDATE
count
=
count
+
1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
insert_select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
off
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
# check that bulk fetch on is at least 2 times faster than bulk fetch off
# which could be useful for debugging.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
#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
;
echo
$verdict
;
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_off
$time_elapsed_on
;
}
enable_warnings
;
drop
table
t1
,
t2
;
drop
table
t
,
t1
,
t2
;
mysql-test/suite/tokudb/t/bf_replace_select.test
View file @
ccd49929
# Verify that index and range scans are not slow
# Verify that index and range scans are not slow
# on tables during replace select
and insert ignore
statements
# on tables during replace select statements
# due to tokudb bulk fetch not being used
# due to tokudb bulk fetch not being used
source
include
/
have_tokudb
.
inc
;
source
include
/
have_tokudb
.
inc
;
source
include
/
big_test
.
inc
;
source
include
/
big_test
.
inc
;
set
default_storage_engine
=
'tokudb'
;
set
default_storage_engine
=
'tokudb'
;
disable_warnings
;
disable_warnings
;
drop
table
if
exists
t
,
t
1
,
t2
;
drop
table
if
exists
t1
,
t2
;
enable_warnings
;
enable_warnings
;
let
$
maxq
=
1
0
;
let
$
debug
=
0
;
CREATE
TABLE
`t`
(
CREATE
TABLE
`t
1
`
(
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`num`
int
(
10
)
unsigned
auto_increment
NOT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
`val`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`num`
)
PRIMARY
KEY
(
`num`
)
);
);
# put 8M rows into t
# Create second table t2 that will serve as the target for the insert select statment
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`
(
CREATE
TABLE
`t2`
(
`count`
bigint
(
20
)
NOT
NULL
`count`
bigint
(
20
)
NOT
NULL
)
ENGINE
=
TokuDB
DEFAULT
CHARSET
=
latin1
;
);
let
$s
=
`select to_seconds(now())`
;
# put 1M rows into t1
INSERT
INTO
t1
values
(
null
,
null
);
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
INSERT
INTO
t1
SELECT
null
,
val
FROM
t1
;
SELECT
count
(
*
)
FROM
t1
;
let
$maxq
=
20
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
;
REPLACE
into
t2
SELECT
count
(
*
)
from
t1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
set
tokudb_bulk_fetch
=
OFF
;
# which could be useful for debugging.
let
$s
=
`select unix_timestamp()`
;
#echo Index scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
REPLACE
into
t2
SELECT
count
(
*
)
from
t1
;
REPLACE
into
t2
SELECT
count
(
*
)
from
t1
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_replace_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
# check that bulk fetch on is at least 2 times faster than bulk fetch off
# with the select statement, which will confirm that bulk fetch is in fact being used.
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
let
$verdict
=
`select abs($time_elapsed_replace_select - $time_elapsed_select) <= $time_elapsed_select`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
index
$time_elapsed_off
$time_elapsed_on
;
}
##############################################################
let
$maxq
=
20
;
let
$s
=
`select to_seconds(now())`
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
SELECT
count
(
*
)
from
t1
;
REPLACE
into
t2
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_
select
=
`select to_seconds(now()
) - $s`
;
let
$time_elapsed_
on
=
`select unix_timestamp(
) - $s`
;
# The following line can be used to display the time elapsed data
set
tokudb_bulk_fetch
=
OFF
;
# which could be useful for debugging.
let
$s
=
`select unix_timestamp()`
;
#echo Index scans took $time_elapsed_select seconds.;
let
$s
=
`select to_seconds(now())`
;
let
$i
=
0
;
let
$i
=
0
;
while
(
$i
<
$maxq
)
{
while
(
$i
<
$maxq
)
{
INSERT
IGNORE
into
t2
SELECT
count
(
*
)
from
t1
;
REPLACE
into
t2
SELECT
count
(
*
)
from
t1
where
num
>
700000
;
inc
$i
;
inc
$i
;
}
}
let
$time_elapsed_insert_ignore_select
=
`select to_seconds(now()) - $s`
;
let
$time_elapsed_off
=
`select unix_timestamp() - $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
let
$verdict
=
`select $time_elapsed_on > 0 && $time_elapsed_off >= 2 * $time_elapsed_on`
;
# 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
;
echo
$verdict
;
if
(
$debug
)
{
echo
range
$verdict
$time_elapsed_off
$time_elapsed_on
;
}
if
(
!
$verdict
)
{
echo
range
$time_elapsed_off
$time_elapsed_on
;
}
##################################################################
drop
table
t1
,
t2
;
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
;
mysql-test/suite/tokudb/t/bf_select_hash_part.test
View file @
ccd49929
...
@@ -66,9 +66,10 @@ let $time_bf_off = `select unix_timestamp() - $s`;
...
@@ -66,9 +66,10 @@ let $time_bf_off = `select unix_timestamp() - $s`;
if
(
$debug
)
{
echo
index
scans
took
$time_bf_off
.
;
}
if
(
$debug
)
{
echo
index
scans
took
$time_bf_off
.
;
}
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
let
$verdict
=
`select $time_bf_o
ff > $time_bf_on
&& $time_bf_off >= 1.5 * $time_bf_on`
;
let
$verdict
=
`select $time_bf_o
n > 0
&& $time_bf_off >= 1.5 * $time_bf_on`
;
echo
$verdict
;
echo
$verdict
;
if
(
!
$verdict
)
{
echo
index
scan
$time_bf_on
$time_bf_off
;
}
if
(
$debug
)
{
echo
index
$verdict
$time_bf_on
$time_bf_off
;
}
if
(
!
$verdict
)
{
echo
index
$time_bf_on
$time_bf_off
;
}
set
tokudb_bulk_fetch
=
ON
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$s
=
`select unix_timestamp()`
;
...
@@ -93,8 +94,9 @@ let $time_bf_off = `select unix_timestamp() - $s`;
...
@@ -93,8 +94,9 @@ let $time_bf_off = `select unix_timestamp() - $s`;
if
(
$debug
)
{
echo
range
scans
took
$time_bf_off
.
;
}
if
(
$debug
)
{
echo
range
scans
took
$time_bf_off
.
;
}
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
let
$verdict
=
`select $time_bf_o
ff > $time_bf_on
&& $time_bf_off >= 1.5 * $time_bf_on`
;
let
$verdict
=
`select $time_bf_o
n > 0
&& $time_bf_off >= 1.5 * $time_bf_on`
;
echo
$verdict
;
echo
$verdict
;
if
(
!
$verdict
)
{
echo
range
scan
$time_bf_on
$time_bf_off
;
}
if
(
$debug
)
{
echo
range
$verdict
$time_bf_on
$time_bf_off
;
}
if
(
!
$verdict
)
{
echo
range
$time_bf_on
$time_bf_off
;
}
drop
table
t
;
drop
table
t
;
mysql-test/suite/tokudb/t/bf_select_range_part.test
View file @
ccd49929
...
@@ -9,7 +9,6 @@ disable_warnings;
...
@@ -9,7 +9,6 @@ disable_warnings;
drop
table
if
exists
t
;
drop
table
if
exists
t
;
enable_warnings
;
enable_warnings
;
let
$maxq
=
20
;
let
$debug
=
0
;
let
$debug
=
0
;
# create the range partition table
# create the range partition table
...
@@ -51,6 +50,8 @@ INSERT INTO t SELECT null,val FROM t;
...
@@ -51,6 +50,8 @@ 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
;
SELECT
count
(
*
)
FROM
t
;
let
$maxq
=
30
;
set
tokudb_bulk_fetch
=
ON
;
set
tokudb_bulk_fetch
=
ON
;
let
$s
=
`select unix_timestamp()`
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
...
@@ -60,8 +61,6 @@ while ($i < $maxq) {
...
@@ -60,8 +61,6 @@ while ($i < $maxq) {
}
}
let
$time_bf_on
=
`select unix_timestamp() - $s`
;
let
$time_bf_on
=
`select unix_timestamp() - $s`
;
if
(
$debug
)
{
echo
index
scans
took
$time_bf_on
;
}
set
tokudb_bulk_fetch
=
OFF
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
...
@@ -71,11 +70,10 @@ while ($i < $maxq) {
...
@@ -71,11 +70,10 @@ while ($i < $maxq) {
}
}
let
$time_bf_off
=
`select unix_timestamp() - $s`
;
let
$time_bf_off
=
`select unix_timestamp() - $s`
;
if
(
$debug
)
{
echo
index
scans
took
$time_bf_off
.
;
}
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
let
$verdict
=
`select $time_bf_o
ff > $time_bf_on
&& $time_bf_off >= 1.5 * $time_bf_on`
;
let
$verdict
=
`select $time_bf_o
n > 0
&& $time_bf_off >= 1.5 * $time_bf_on`
;
echo
$verdict
;
echo
$verdict
;
if
(
$debug
)
{
echo
index
$verdict
$time_bf_on
$time_bf_off
;
}
if
(
!
$verdict
)
{
echo
index
scan
$time_bf_on
$time_bf_off
;
}
if
(
!
$verdict
)
{
echo
index
scan
$time_bf_on
$time_bf_off
;
}
set
tokudb_bulk_fetch
=
ON
;
set
tokudb_bulk_fetch
=
ON
;
...
@@ -87,8 +85,6 @@ while ($i < $maxq) {
...
@@ -87,8 +85,6 @@ while ($i < $maxq) {
}
}
let
$time_bf_on
=
`select unix_timestamp() - $s`
;
let
$time_bf_on
=
`select unix_timestamp() - $s`
;
if
(
$debug
)
{
echo
range
scans
took
$time_bf_on
;
}
set
tokudb_bulk_fetch
=
OFF
;
set
tokudb_bulk_fetch
=
OFF
;
let
$s
=
`select unix_timestamp()`
;
let
$s
=
`select unix_timestamp()`
;
let
$i
=
0
;
let
$i
=
0
;
...
@@ -98,11 +94,10 @@ while ($i < $maxq) {
...
@@ -98,11 +94,10 @@ while ($i < $maxq) {
}
}
let
$time_bf_off
=
`select unix_timestamp() - $s`
;
let
$time_bf_off
=
`select unix_timestamp() - $s`
;
if
(
$debug
)
{
echo
range
scans
took
$time_bf_off
.
;
}
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
# check that the scan time with bulk fetch off is at least 1.5 times as long as with bulk fetch on
let
$verdict
=
`select $time_bf_o
ff > $time_bf_on
&& $time_bf_off >= 1.5 * $time_bf_on`
;
let
$verdict
=
`select $time_bf_o
n > 0
&& $time_bf_off >= 1.5 * $time_bf_on`
;
echo
$verdict
;
echo
$verdict
;
if
(
!
$verdict
)
{
echo
range
scan
$time_bf_on
$time_bf_off
;
}
if
(
$debug
)
{
echo
range
$verdict
$time_bf_on
$time_bf_off
;
}
if
(
!
$verdict
)
{
echo
range
$time_bf_on
$time_bf_off
;
}
drop
table
t
;
drop
table
t
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment