I need to update TABLEA with a value where the uin is in TABLEB OR TABLEC OR TABLED. I have used left outer joins to do this.
This query is taking a huge amount of time to run, even though the correct indexes are present.
Is there a simple way around this problem without having to use legacy joins ?
update A
set A.column1 = '1'
from TABLEA A
left outer join TABLEB B on A.uin = B.uin
left outer join TABLEC C on A.uin = C.uin
left outer join TABLED D on A.uin = D.uin
where ( B.uin is not null
or C.uin is not null
or D.uin is not null ) )
ta
Paul
This query is taking a huge amount of time to run, even though the correct indexes are present.
Is there a simple way around this problem without having to use legacy joins ?
update A
set A.column1 = '1'
from TABLEA A
left outer join TABLEB B on A.uin = B.uin
left outer join TABLEC C on A.uin = C.uin
left outer join TABLED D on A.uin = D.uin
where ( B.uin is not null
or C.uin is not null
or D.uin is not null ) )
ta
Paul