I am facing a performance issue with an update statement. It takes too long to update, but when I perform a select on that updating table it completes very fast.
UPDATE mo SET mo.RNCNEID = ts.RNCID, mo.SiteNEID = ts.SiteID, mo.SectorNEID = ts.SectorID FROM COPS_UMTS_HUAWEI.PER.tHuawei_CELL_Ncell_DY_HR AS mo INNER JOIN COPS_UMTS_HUAWEI.Aggregation.tsector AS ts ON mo.rncname = ts.rncname AND mo.cellid = ts.cid AND ts.VendorID = 6 AND ts.TechnologyID = 2 WHERE mo.RNCNEID IS NULL;
After running the below query:
SELECT COUNT(*) FROM COPS_UMTS_HUAWEI.PER.tHuawei_CELL_Ncell_DY_HR WITH (NOLOCK) WHERE RNCNEID IS NULL;
...it completes very fast.