Slightly simpler query:
EXPLAIN SELECT f2 FROM t3 WHERE (SELECT pk FROM t1 WHERE EXISTS (SELECT DISTINCT f1 FROM t2) ) IS NULL ;
- distinct in the inner-most query is needed to force a temp table - 'IS NULL' is needed too, not yet clear why
Slightly simpler query:
EXPLAIN
SELECT f2 FROM t3
WHERE (SELECT pk FROM t1
WHERE EXISTS (SELECT DISTINCT f1 FROM t2)
) IS NULL ;
- distinct in the inner-most query is needed to force a temp table
- 'IS NULL' is needed too, not yet clear why