摘要:
分析慢SQL-Q16
索引条件下推:
ICP(Index Condition Pushdown) - 索引条件下推
什么是
ICP
?不如换个问法,
ICP
索引条件下推的作用是什么? 一句话总结:索引条件下推ICP
就是尽可量利用二级索引筛除不符合where
条件的记录,如此一来减少需要回表继续判断的次数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