Performance tuning

How to configure SQL Server tempdb for optimal performance

SQL Server tempdb is a database in SQL Server which is used to store temporary user objects and internal objects. Because the tempdb is used a lot by SQL Server it is important for the performance to configure it correctly. Tempdb is only using one data file by default. Multiple data files can improve the [...]

How to make your SQL Server index faster by updating statistics

The query optimizer in SQL Server uses statistics. The data in statistics is used to create the query plans that improve query performance. If the data in the statistics is better the queries will perform faster. To ensure the queries will perform as fast as possible it is important to update the statistics. You can [...]

How to speed up SQL Server log file by reducing number of virtual log file

Background: A log file records all the changes that occur in a SQL Server database. This log file contains multiple virtual log files(VLFs) these are used to manage space reuse. If SQL Server needs more space to store this information the log file will increase by its Autogrowth size. Increasing the size of the log [...]

How to defragment indexes using script in SQL Server 2005/2008 R2

Background: When a query is executed on a database, indexes are used to physically locate the data on disk. Due to frequent insert, update and delete statements this data can become fragmented. This is a serious performance issue. To mitigate this schedeule this script in a SQL Agent Job to frequently defragment you indexes. Steps: [...]