我有一个触发器超时,无论何时触发,但是如果我注释掉一个元素,它确实没有超时,如果我改变一个左连接只是加入,它不会超时但是我的担心是只是加入我不会得到所有的数据,包括。
UPDATE BH_ASSAY_RESULTS
SET
PT = LAP_PT.LAB_ASSAY_PRIMARY_RESULT_VALUE,
PD = LAP_PD.LAB_ASSAY_PRIMARY_RESULT_VALUE,
AU = LAP_AU.LAB_ASSAY_PRIMARY_RESULT_VALUE,
RH = LAP_RH.LAB_ASSAY_PRIMARY_RESULT_VALUE,
Os = LAP_OS.LAB_ASSAY_PRIMARY_RESULT_VALUE,
Ru = LAP_RU.LAB_ASSAY_PRIMARY_RESULT_VALUE,
Ir = LAP_IR.LAB_ASSAY_PRIMARY_RESULT_VALUE,
LAB_MASS_RECEIVED = LAP_WTREC.LAB_ASSAY_PRIMARY_RESULT_VALUE
FROM BH_ASSAY_RESULTS VPGE
JOIN BH_SAMP BHS ON VPGE.PPK = BHS.PK
JOIN LAB_ETL_SAMPLING LET ON BHS.ID = LET.CLIENT_SAMP_ID
JOIN LAB_SUBMISSION LS ON LS.PK = LET.PPK
JOIN LAB_BATCH LB ON LB.PK = LS.PPK
JOIN LAB_ETL LE ON LE.PK = LB.PPK
JOIN LAB_REP LR ON LET.PK = LR.PPK and LR.REP_ID >= 1
JOIN V_LAB_ASSAY_PRIMARY LAP_Pt ON LR.PK = LAP_Pt.LAB_METHOD_PPK and LAP_Pt.LAB_ASSAY_PRIMARY_RESULT_ID = 'pt'
JOIN V_LAB_ASSAY_PRIMARY LAP_Pd ON LR.PK = LAP_Pd.LAB_METHOD_PPK and LAP_Pd.LAB_ASSAY_PRIMARY_RESULT_ID = 'Pd'
LEFT JOIN V_LAB_ASSAY_PRIMARY LAP_Au ON LR.PK = LAP_Au.LAB_METHOD_PPK and LAP_Au.LAB_ASSAY_PRIMARY_RESULT_ID = 'Au'
LEFT JOIN V_LAB_ASSAY_PRIMARY LAP_Rh ON LR.PK = LAP_Rh.LAB_METHOD_PPK and LAP_Rh.LAB_ASSAY_PRIMARY_RESULT_ID = 'Rh'
LEFT JOIN V_LAB_ASSAY_PRIMARY LAP_OS ON LR.PK = LAP_OS.LAB_METHOD_PPK and LAP_OS.LAB_ASSAY_PRIMARY_RESULT_ID = 'Os'
LEFT JOIN V_LAB_ASSAY_PRIMARY LAP_Ru ON LR.PK = LAP_Ru.LAB_METHOD_PPK and LAP_Ru.LAB_ASSAY_PRIMARY_RESULT_ID = 'Ru'
LEFT JOIN V_LAB_ASSAY_PRIMARY LAP_IR ON LR.PK = LAP_IR.LAB_METHOD_PPK and LAP_IR.LAB_ASSAY_PRIMARY_RESULT_ID = 'Ir'
LEFT JOIN V_LAB_ASSAY_PRIMARY LAP_WTREC ON LR.PK = LAP_WTREC.LAB_METHOD_PPK and LAP_WTREC.LAB_ASSAY_PRIMARY_RESULT_ID = 'WTREC'
WHERE LS.PK = @Submission_Pk and VPGE.LAB_USED = LE.ID and VPGE.REP_TYPE = LR.REP_ID --LE.ID