У меня медленный запрос
select * from table1 where id NOT IN ( select id from table2 )
Будет ли это быстрее, если сделать что-то вроде (не уверен, если это возможно):
select * from table1 where id not in ( select id from table2 where id = table1.id )
Или:
select * from table1 where table1.id NOT EXIST( select id from table2 where table2.id = table1.id )
Или:
select * from table1
left join table2 on table2.id = table1.id
WHERE table2.id is null
Или делать что-то еще?Как разбить его на два запроса ...