Mysql select where not in table
I think your last statement is the best way. You can also try
SELECT A.*
from A left join B on
A.x = B.y
where B.y is null
I use queries in the format of your second example. A join is usually more scalable than a correlated subquery.