MySQL:Index Condition Pushdown

来自WHY42
Riguz留言 | 贡献2021年5月3日 (一) 13:50的版本 (建立內容為「<span class="article-label">Index Condition Pushdown (ICP)</span> is an optimization for the case where MySQL retrieves rows from a table using an index. Without…」的新頁面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

is an optimization for the case where MySQL retrieves rows from a table using an index. Without ICP, the storage engine traverses the index to locate rows in the base table and returns them to the MySQL server which evaluates the WHERE condition for the rows. With ICP enabled, and if parts of the WHERE condition can be evaluated by using only columns from the index, the MySQL server pushes this part of the WHERE condition down to the storage engine. The storage engine then evaluates the pushed index condition by using the index entry and only if this is satisfied is the row read from the table. ICP can reduce the number of times the storage engine must access the base table and the number of times the MySQL server must access the storage engine.