Tag: constraint

Pro Members SQL Server Standard Members

SQL Server 2019 Transact-SQL optimization tips (Part 2)

SQL Server 2019 Transact-SQL optimization tips (Part 2) Try to avoid using the DISTINCT clause, whenever possible. The DISTINCT clause should only be used if you know that duplicate returned rows are a possibility. Because using the DISTINCT clause will result in some performance degradation, you should use this clause only when it is necessary. Consider using a MAXDOP option...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

SQL Server 2019 Transact-SQL optimization tips (Part 1)

SQL Server 2019 Transact-SQL optimization tips (Part 1) Use table variables instead of temporary tables. Table variables require less locking and logging resources than temporary tables, so table variables should be used whenever possible. Try to avoid using SQL Server cursors, whenever possible. SQL Server cursors can result in some performance degradation in comparison with select statements. Try to use...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

Some tips for designing SQL Server 2016 tables (Part 1)

Some tips for designing SQL Server 2016 tables (Part 1) Avoid using timestamp column as a primary key. Timestamp is a data type that exposes automatically generated, unique binary numbers within a database. Every time that a row with a timestamp column is modified or inserted, the incremented database rowversion value is inserted in the timestamp column. This property makes...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

SQL Server 2014 Transact-SQL Optimization Tips (Part 2)

SQL Server 2014 Transact-SQL Optimization Tips (Part 2) Try to restrict the queries result set by using the WHERE clause. This can results in good performance benefits, because SQL Server will return to client only particular rows, not all rows from the table(s). This can reduce network traffic and boost the overall performance of the query. Consider using the CONTAINS...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
Pro Members SQL Server Standard Members

SQL Server 2014 Transact-SQL Optimization Tips (Part 1)

SQL Server 2014 Transact-SQL Optimization Tips (Part 1) Use views and stored procedures instead of heavy-duty queries. This can reduce network traffic, because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict user access...

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register
SQL Server

SQL Server 2014 Transact-SQL Optimization Tips (Part 1)

SQL Server 2014 Transact-SQL Optimization Tips (Part 1) Use views and stored procedures instead of heavy-duty queries. This can reduce network traffic, because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict user access […]

Pro Members SQL Server Standard Members

Tips for using constraints in SQL Server 2014

Tips for using constraints in SQL Server 2014 Use CHECK constraints instead of rules. Rules are provided for backward compatibility and have been replaced by CHECK constraints. Constraints are much more efficient than rules and can boost performance. Rules have some restrictions. For example, only one rule can be applied to a column, but multiple CHECK constraints can be applied....

This content is for Pro, Pro Member, Pro Member Annual - Fall Sale, Pro Member Monthly - Fall Sale, Standard, Standard Member, Standard Member Annual - Fall Sale, and Standard Member Monthly - Fall Sale members only.
Log In Register