MySql in子句 效率低下优化 背景: 更新一张表中的某些记录值,更新条件来自另一张含有200多万记录的表,效率极其低下,耗时高达几分钟. update clear_res set candelete=0 where resid in ( select distinct resourceid from att_attentionresult where important=0 ); 耗时 365s 优化后 update clear_res set candelete=0 where resi