> create table ss_temp_table1 as select id, v1, v2 from ss_d order by id desc > limit 100000; ... > FROM ss_d AS d > JOIN ss_temp_table1 AS t1 ON t1.id = d.id AND t1.v1 = d.v1 AND t1.v2 > = d.v2
Do your real tables/queries have the same kind of redudant condition ( i.e., "AND t1.v1 = d.v1 AND t1.v2" is redundant due to id being a "PK" )?
It is not redundant. There might be rows in ss_d and ss_temp_table1 that have same id, but different v1, v2 values and this join should reject it, however usually that is a minority.