Tips for using constraints in SQL Server 2019 Avoid using CHECK_CONSTRAINTS hint with bulk copy program. Using this hint can significantly degrade performance of the bulk copy operation, because for each row loaded the CHECK constraints defined on the destination table will be executed. Without the CHECK_CONSTRAINTS hint, any CHECK constraints will be ignored. Consider using the NOT FOR REPLICATION...
Tag: constraints
Tips for using SQL Server 2017 triggers
Tips for using SQL Server 2017 triggers Try to use CHECK constraints instead of triggers whenever possible. Constraints are much more efficient than triggers and can boost performance. Constraints are also more consistent and reliable in comparison with triggers, because you can make errors when you write your own code to perform the same actions as the constraints. So, you...
Tips for using constraints in SQL Server 2017
Tips for using constraints in SQL Server 2017 Use cascading referential integrity constraints instead of triggers whenever possible. For example, if you need to make cascading deletes or updates, specify the ON DELETE or ON UPDATE clause in the REFERENCES clause of the CREATE TABLE or ALTER TABLE statement. The cascading referential integrity constraints are much more efficient than triggers...
Tips for using Very Large Databases in SQL Server 2016
Tips for using Very Large Databases in SQL Server 2016 Try to create as many database files, as there are physical disk arrays so that you have one file per disk array. This will improve performance, because when a table is accessed sequentially, a separate thread is created for each file on each disk array in order to read the...
Tips for using SQL Server 2016 triggers
Tips for using SQL Server 2016 triggers Try to minimize the number of rows affected in a trigger. The more number of rows affected in a trigger, the more time a trigger takes to run. So, try to reduce the number of rows affected in a trigger. Consider using triggers on memory-optimized tables. SQL Server 2016 introduces supporting triggers on […]
Tips for using Integration Services in SQL Server 2014 (Part 1)
Tips for using Integration Services in SQL Server 2014 (Part 1) Try to avoid SSIS lookups. Because SSIS lookups slow down performance, try to use the Transact-SQL statements to perform the same functions. If you need to combine data rows from multiple upstream data flow components, you can use the Union All, Merge, and Merge Join transformations. These transformations make...
Tips for using SQL Server 2012 constraints
Tips for using SQL Server 2012 constraints Try to create a single column constraint. The more columns the constraint will have, the slowly it will work and the more stored space it will require. Use cascading referential integrity constraints instead of triggers whenever possible. For example, if you need to make cascading deletes or updates, specify the ON DELETE or...
Tips for using SQL Server 2012 triggers
Tips for using SQL Server 2012 triggers Microsoft SQL Server 2012 introduces many new useful stored procedures, functions and operators. Some actions you can perform without these new features, but usually using them provides more easy and effective way to accomplish the same goal. In this article, you can find some tips to use triggers in SQL Server 2012. Try...