--source include/have_innodb.inc create table t1(f1 int, f2 int, f3 int, primary key(f1,f2,f3)) engine=innodb; insert into t1 values(1,2,3); insert into t1 values(2,1,3); insert into t1 values(3,2,1); insert into t1 values(3,1,2); insert into t1 values(2,3,1); flush status; --disable_result_log select t11.f2, t11.f3, t12.f1 from t1 as t11 join t1 as t12; --enable_result_log show status like '%tmp%'; flush status; insert ignore into t1 select t11.f2, t11.f3, t12.f1 from t1 as t11 join t1 as t12; show status like '%tmp%'; explain select t11.f2, t11.f3, t12.f1 from t1 as t11 join t1 as t12; explain insert ignore into t1 select t11.f2, t11.f3, t12.f1 from t1 as t11 join t1 as t12;