Tips for using table hints in SQL Server 2017 If you want to set any table hints, do not remember to test the query with hint and without the hint and compare results. Because SQL Server 2017 query optimizer usually proposes the best execution plan, you should test the query with table hint and use this hint only when it...
Tag: nolock
Some tips for using table hints in SQL Server 2016
Some tips for using table hints in SQL Server 2016 Use the INSERT … SELECT statement with the TABLOCK hint. In SQL Server 2016, the insert in an INSERT … SELECT statement is multi-threaded or can have a parallel plan. To get a parallel plan, you can use the compatibility level 130 and the INSERT … SELECT statement must use […]
Top 20 tips to optimize your T-SQL code (Part-1)
Top 20 tips to optimize your T-SQL code (Part-1) Author: Basit A. Farooq Troubleshooting the database performance bottlenecks is not an easy task, since it can be influenced by a lot of different factors. However, common symptoms of SQL Server database performance bottlenecks are related to bad Transact-SQL (T-SQL) code. This is because, the core database application logic is done...
Top 20 tips to optimize your T-SQL code (Part-1)
Top 20 tips to optimize your T-SQL code (Part-1) Author: Basit A. Farooq Troubleshooting the database performance bottlenecks is not an easy task, since it can be influenced by a lot of different factors. However, common symptoms of SQL Server database performance bottlenecks are related to bad Transact-SQL (T-SQL) code. This is because, the core database application logic is done […]
Tips for using table hints in SQL Server 2014
Tips for using table hints in SQL Server 2014 One of the ways to increase the queries performance is using the SQL Server 2014 table hints. The table hints specify a locking method to be used by the query optimizer with this table, specify the locking granularity for a table, or one or more indexes to be used by the...