Data extraction from 2 tables Data in table A:

X   Y
------
m1  r1
m1  r2
m1  r3
m2  r1
m2  r4
m2  r5


Data in Table B:

Z
--
r1
r2
r3
r4
r5




Using a query I want a result like

m1  r4
m1  r5
m2  r2
m2  r3


The data required from join of two sample tables so that data corresponding to column Y which is not in table B. I have already developed a solution using cursors and inserting data in the table but that's is causing performance issues like 10 hours for 125122 distinct rows of column X in table A. I want a query where insertion operations are not involved so that we can save some disk I/O operations and optimize the performance.
It is not nice - sort of anti-join

http://sqlfiddle.com/#!9/cb0124/3

SELECT a1.x, b.z
FROM (
        (SELECT DISTINCT x FROM a) a1,
        b
     ) LEFT JOIN a a2 ON (b.z = a2.y AND a2.x=a1.x)
WHERE a2.x IS NULL;