SQL Server 2016 Transact-SQL Optimization Tips (Part 1) Consider using a new query hint NO_PERFORMANCE_SPOOL. This hint was first introduced in SQL Server 2016 and can prevent a spool operator from being added to query plans. This can improve performance when many concurrent queries are running with spool operations. Try to restrict the queries result set by using the WHERE...
Tag: hint
Some tips for using indexed views in SQL Server 2016
Some tips for using indexed views in SQL Server 2016 Consider creating two or more smaller views instead of creating a single large indexed view. Sometimes it can greatly improve performance especially if the underlying tables are located in different databases. Add an index to a view very carefully. When the underlying tables of the view are modified, the clustered […]
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...
Tips for using SQL Server 2012 Query Hints
Tips for using SQL Server 2012 Query Hints If your query is very slow, try the following before using query hints: – rebuild indexes used in the query (or defragment them using DBCC INDEXDEFRAG), – update statistics on the relevant tables, – consider creating new indexes for this query, – rewrite your query to provide better execution plan. Use the...