Details
-
Bug
-
Status: Closed (View Workflow)
-
Resolution: Not a Bug
-
None
-
None
-
None
Description
When DBT3 Q18 is run against an InnoDB database, it uses ICP, if run
with the same settings against the same MyISAM database, ICP is not used.
EXPLAINs:
InnoDB:
set @@optimizer_switch='index_condition_pushdown=on, semijoin=off';
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | PRIMARY | customer | ALL | PRIMARY | NULL | NULL | NULL | 4476636 | Using temporary; Using filesort |
| 1 | PRIMARY | orders | ref | PRIMARY,i_o_custkey | i_o_custkey | 5 | dbt3.customer.c_custkey | 7 | Using index condition; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan |
| 1 | PRIMARY | lineitem | ref | PRIMARY,i_l_orderkey,i_l_orderkey_quantity | i_l_orderkey_quantity | 4 | dbt3.orders.o_orderkey | 2 | Using index |
| 2 | SUBQUERY | lineitem | index | NULL | PRIMARY | 8 | NULL | 179175334 | Â |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
(5 min 0.98 sec)
MYISAM:
set @@optimizer_switch='index_condition_pushdown=on, semijoin=off';
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | PRIMARY | customer | ALL | PRIMARY | NULL | NULL | NULL | 4500000 | Using temporary; Using filesort |
| 1 | PRIMARY | orders | ref | PRIMARY,i_o_custkey | i_o_custkey | 5 | dbt3.customer.c_custkey | 15 | Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan |
| 1 | PRIMARY | lineitem | ref | PRIMARY,i_l_orderkey,i_l_orderkey_quantity | i_l_orderkey_quantity | 4 | dbt3.orders.o_orderkey | 4 | Using index |
| 2 | SUBQUERY | lineitem | index | NULL | i_l_orderkey_quantity | 13 | NULL | 179998372 | Using index |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------