id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using where; Using index
1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key = col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using where; Using index
1 SIMPLE t2 ref col_datetime_key col_datetime_key 9 test.t1.col_time_key 1 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key = col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where
1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where
1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using where; Using index
1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key = col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using where; Using index
1 SIMPLE t1 ref col_time_key col_time_key 4 test.t2.col_datetime_key 2 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key = col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key >= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key >= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key >= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key >= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key > col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key > col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key > col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key > col_time_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key <= col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-30 00:00:00
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-29 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-01-31 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-01 00:00:00
24:00:00 2012-02-02 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key <= col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
-24:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
00:00:00 2012-01-31 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
24:00:00 2012-02-01 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
48:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key <= col_datetime_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-01-31 00:00:00 00:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-01 00:00:00 24:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key <= col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 -48:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 -24:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 00:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 24:00:00
2012-02-01 00:00:00 48:00:00
2012-02-02 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 ignore INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` IGNORE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 ignore INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_time_key < col_datetime_key;
col_time_key col_datetime_key
-24:00:00 2012-01-31 00:00:00
-24:00:00 2012-02-01 00:00:00
-24:00:00 2012-02-02 00:00:00
-48:00:00 2012-01-30 00:00:00
-48:00:00 2012-01-31 00:00:00
-48:00:00 2012-02-01 00:00:00
-48:00:00 2012-02-02 00:00:00
00:00:00 2012-02-01 00:00:00
00:00:00 2012-02-02 00:00:00
24:00:00 2012-02-02 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index col_time_key col_time_key 4 NULL 5 100.00 Using index
1 SIMPLE t2 ALL col_datetime_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t1 force INDEX (col_time_key)
STRAIGHT_JOIN
t2 force INDEX (col_datetime_key)
WHERE col_datetime_key < col_time_key;
col_time_key col_datetime_key
-24:00:00 2012-01-29 00:00:00
00:00:00 2012-01-29 00:00:00
00:00:00 2012-01-30 00:00:00
24:00:00 2012-01-29 00:00:00
24:00:00 2012-01-30 00:00:00
24:00:00 2012-01-31 00:00:00
48:00:00 2012-01-29 00:00:00
48:00:00 2012-01-30 00:00:00
48:00:00 2012-01-31 00:00:00
48:00:00 2012-02-01 00:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` IGNORE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 ignore INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 ignore INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_time_key < col_datetime_key;
col_datetime_key col_time_key
2012-01-30 00:00:00 -48:00:00
2012-01-31 00:00:00 -24:00:00
2012-01-31 00:00:00 -48:00:00
2012-02-01 00:00:00 -24:00:00
2012-02-01 00:00:00 -48:00:00
2012-02-01 00:00:00 00:00:00
2012-02-02 00:00:00 -24:00:00
2012-02-02 00:00:00 -48:00:00
2012-02-02 00:00:00 00:00:00
2012-02-02 00:00:00 24:00:00
EXPLAIN EXTENDED SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index col_datetime_key col_datetime_key 9 NULL 5 100.00 Using index
1 SIMPLE t1 ALL col_time_key NULL NULL NULL 5 100.00 Range checked for each record (index map: 0x1)
Warnings:
Note 1003 select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
SELECT * FROM
t2 force INDEX (col_datetime_key)
STRAIGHT_JOIN
t1 force INDEX (col_time_key)
WHERE col_datetime_key < col_time_key;
col_datetime_key col_time_key
2012-01-29 00:00:00 -24:00:00
2012-01-29 00:00:00 00:00:00
2012-01-29 00:00:00 24:00:00
2012-01-29 00:00:00 48:00:00
2012-01-30 00:00:00 00:00:00
2012-01-30 00:00:00 24:00:00
2012-01-30 00:00:00 48:00:00
2012-01-31 00:00:00 24:00:00
2012-01-31 00:00:00 48:00:00
2012-02-01 00:00:00 48:00:00
DROP TABLE t1,t2;
CREATE TABLE t1 (
pk INT NOT NULL AUTO_INCREMENT,
col_int_nokey INT,
col_int_key INT NOT NULL,
PRIMARY KEY (pk),
KEY col_int_key (col_int_key)
);
INSERT INTO t1 VALUES (10,1,7), (11,7,0), (12,4,9), (13,7,3),
EXPLAIN EXTENDED SELECT * FROM t2 STRAIGHT_JOIN t3 FORCE INDEX (col_time_key)
ON t3.col_time_key > t2.col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system col_datetime_key NULL NULL NULL 1 100.00
1 SIMPLE t3 index col_time_key col_time_key 4 NULL 20 100.00 Using where; Using index
Warnings:
Note 1003 select 1 AS `col_int_nokey`,'2001-11-04 19:07:55' AS `col_datetime_key`,'k' AS `col_varchar_key`,`test`.`t3`.`col_time_key` AS `col_time_key` from `test`.`t3` FORCE INDEX (`col_time_key`) where (`test`.`t3`.`col_time_key` > '2001-11-04 19:07:55')
SELECT * FROM t2 STRAIGHT_JOIN t3 FORCE INDEX (col_time_key)
EXPLAIN EXTENDED SELECT * FROM t2 STRAIGHT_JOIN t3 IGNORE INDEX (col_time_key)
ON t3.col_time_key > t2.col_datetime_key;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 system col_datetime_key NULL NULL NULL 1 100.00
1 SIMPLE t3 ALL NULL NULL NULL NULL 20 100.00 Using where
Warnings:
Note 1003 select 1 AS `col_int_nokey`,'2001-11-04 19:07:55' AS `col_datetime_key`,'k' AS `col_varchar_key`,`test`.`t3`.`col_time_key` AS `col_time_key` from `test`.`t3` IGNORE INDEX (`col_time_key`) where (`test`.`t3`.`col_time_key` > '2001-11-04 19:07:55')
SELECT * FROM t2 STRAIGHT_JOIN t3 IGNORE INDEX (col_time_key)