Update sql is too slow with a big sub-query
Hi, I have an update statement with an inner query. This is what I am using right now.
UPDATE tableA
set status = 'new'
WHERE
ID not in (SELECT id from tableB)
Since I only want to update records in tableA where ID is not in TableB, the subquery is there. However the sub query can be 100,000 records and that hangs the update stmt.
Any advice? Thanks.