My Oracle Support Banner

Why ICP (Index Condition Pushdown) does not work in some cases? (Doc ID 1644099.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Server - Version 5.6 and later
Information in this document applies to any platform.

Goal

To know why Index Condition Pushdown not used in certain conditions in InnoDB, while it works for MyISAM?

mysql> explain select * from t3_push where rank1 = 100 and nickname like '%ab%';
+----+-------------+---------+------+---------------+--------+---------+-------+------+-----------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+---------+------+---------------+--------+---------+-------+------+-----------------------+
| 1 | SIMPLE | t3_push | ref | idx_u1 | idx_u1 | 5 | const | 7821 | Using index condition |                 <---------------- Works for MyISAM table here.
+----+-------------+---------+------+---------------+--------+---------+-------+------+-----------------------+
1 row in set (0.00 sec)


mysql> alter table t3_push engine=InnoDB;
Query OK, 1048578 rows affected (11.18 sec)
Records: 1048578 Duplicates: 0 Warnings: 0


mysql> explain select * from t3_push where rank1 = 100 and nickname like '%ab%';
+----+-------------+---------+------+---------------+--------+---------+-------+-------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+---------+------+---------------+--------+---------+-------+-------+--------------------------+
| 1 | SIMPLE | t3_push | ref | idx_u1 | idx_u1 | 5 | const | 11658 | Using where; Using index |            <--------------- Does not work for InnoDB table here.
+----+-------------+---------+------+---------------+--------+---------+-------+-------+--------------------------+
1 row in set (0.00 sec)

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.