ch as a constraint, default, log, rule, and stored procedure.
select * from sys.sysobjects where name like '%tx_coupons_to_registrations%' and xtype = 'P'
--Contains a row for each object that is a SQL language-defined module. Objects of type P, RF, V, TR, FN, IF, TF, R, and D have an associated SQL module.
select top 10 * from sys.sql_modules where definition like '%tx_coupons_to_registrations%'
OPTION(MAXDOP 1) at the end of SELECT statement on production. This limits process on a single CPU, and process on other CPU's would not be affected in an event of heavy process is requested.
E.g select top 1 * from [TABLE] OPTION(MAXDOP 1)
There is no need to add "WITH(NOLOCK)" to all the tables. Add "set transaction isolation level read uncommitted" to the top of the sql.
Delete statement:
DELETE FROM TABLE
FROM TABLE t WITH(NOLOCK)
JOIN TABLE1 t1 WITH(NOLOCK) on t.id=t1.id
联系客服