hi all, i use a single stored procedure to update many tables in sql server 2014 database, using defalut transaction isolation level we got random performance issues.maybe it would better to use read uncommitted isolation level?what's happens ,in the both cases( read committed, uncommitted) if the sp is called at the same time passing the same @key parameter?this is a sample to show of the real stored procedure works:[code]CREATE PROCEDURE SP_Test@Key int,@Values1 Values1 readonly,@Values2 Values2 readonly,@Values3 Values3 readonlyASBEGINBEGIN TRANSACTION DELETE FROM TABLE1 WHERE KEY=@Key DELETE FROM TABLE2 WHERE KEY=@Key DELETE FROM TABLE3 WHERE KEY=@Key Insert Into TABLE1(KEY,FIELD) Select @Key , FIELD FROM @Values1 Insert Into TABLE2(KEY,FIELD) Select @Key , FIELD FROM @Values2 Insert Into TABLE3(KEY,FIELD) Select @Key , FIELD FROM @Values3COMMIT TRANSACTIONEND[/code]
↧