Tips for using linked servers in SQL Server 2019 Rewrite remote queries so, that the most work will be performed on the remote server, not the local server. You can run the remote query from Management Studio and take a look at the query plan to find out which parts of the remote query are performing on the remote server...
Tag: tips
Tips for using indexed views in SQL Server 2019
Tips for using indexed views in SQL Server 2019 Avoid creating indexes on a view when the queries that use the view don’t contain JOINs or aggregations. In this case, the queries will not take advantages of the view’s indexes and the queries performance will be the same. Don’t create index on column(s) which values has low selectivity. For example,...
Tips for using User-Defined Functions in SQL Server 2019
Tips for using User-Defined Functions in SQL Server 2019 Try to use Scalar UDF Inlining feature. SQL Server 2019 supports Scalar UDF Inlining. This feature automatically transforms scalar UDFs into relational expressions and embeds them in the calling SQL query. This transformation improves the performance of workloads that take advantage of scalar UDFs. A Scalar UDF can be inline when...
Tips for using full-text search in SQL Server 2019
Tips for using full-text search in SQL Server 2019 Make full-text index population during periods of low database access. Because full-text index population takes some time, these updates should be scheduled during CPU idle time and slow production periods. Reduce the full-text unique key size. To create a full-text index, the table to be indexed must have a unique index....
Some tips for using SQL Server 2019 cursors
Some tips for using SQL Server 2019 cursors Try to avoid using SQL Server cursors, whenever possible. SQL Server cursors can results in some performance degradation in comparison with select statements. Try to use correlated subquery or derived tables, if you need to perform row-by-row operations. Use READ ONLY cursors, whenever possible, instead of updatable cursors. Because using cursors can...
Some tips for using SQL Server 2019 triggers
Some tips for using SQL Server 2019 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 disabling trigger’s recursion. Triggers are said to be recursive when a...
Tips for using constraints in SQL Server 2019
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...
Tips for using backup and restore in SQL Server 2019
Tips for using backup and restore in SQL Server 2019 Use separate storage for the database backups. Ensure that you place your database backups on a separate physical location or device from the database files. You can use backup/restore of memory-optimized files on Azure Storage. In SQL Server 2019 memory-optimized filegroup files can be stored on Azure Storage. Backup/Restore of...
Some tips for using SQL Server 2019 file and filegroups
Some tips for using SQL Server 2019 file and filegroups Consider placing the tempdb log files on other physical disk arrays than those with the data files. Because logging is usually more write-intensive, it is important that the disk arrays containing the tempdb log files have sufficient disk I/O performance. Set the maximum size of the data and log files....
Tips for using SQL Server 2019 Reporting Services
Tips for using SQL Server 2019 Reporting Services SQL Server 2019 Reporting Services (SSRS) is a server-based reporting platform that provides comprehensive reporting functionality. You can download SSRS 2019 at here: https://www.microsoft.com/en-us/download/details.aspx?id=100122 Consider hosting a database catalog used for SSRS in an Azure SQL Managed Instance. In SSRS 2019 you can host a database catalog used for SSRS in an...