The requirement is to copy rows from Table B into Table A. Only rows with an id that doesn t already exist, need to be copied over:
INSERT INTO A(id, x, y)
SELECT id, x, y
FROM B b
WHERE b.id IS NOT IN (SELECT id FROM A WHERE x= t );
^^^^^^^^^^^
Now, I was trying to write this with an outer join to compare the explain paths, but I can t write this (efficiently at least).
Note that the sql highlighted with ^ s make this tricky.