Performance Tuning in SQL Server involves identification and execution of error correcting strategies to improve application performance. The scale of enterprise databases makes it a challenging task to locate the erroneous components and strategize a solution that best suits the organization’s needs.

Over the years that we have worked with large organizations, we have identified some of the critical strategies that DBAs can implement to optimize the SQL Server. These strategies cover most of the issues that the database presents.

1. Handling the logs

Logging strategies are one of the most ignored aspects of an SQL Server. Enterprise applications have a large amount of logs being generated on a daily basis, and they tend to become one of the bottlenecks in the application quickly. Some of the strategies that you can implement are as follows.

  1. Transaction Logs – These logs require a significant amount of free space. Failing to do so leads to these files running the grow file operation. The grow file operation is an expensive, time-consuming operation that can block the DML commands of the database until the operation has been completed.
  2. Virtual Log Files – Most of the applications have a higher number of VLF files that necessary in a transaction log. It is essential to set the right size so that the number of these files that are created doesn’t go out of hand and cause performance hits.
  3. Separation of Concern- while conducting performance tuning in SQL server, it important you make sure that the server is not overloaded. To achieve performance stability make sure that the data files are separate from the log files. By doing so, you are making sure that the random access of files does not interfere with the sequential access.

2.  I/O Bottlenecks

SQL server is a highly I/O intensive process. The application relies on this process to fetch and store data. This makes the server sometimes to grow exponentially and cause performance bottlenecks.

Resolving these I/O related issues usually leads to a significant improvement in the performance of the system.  The first step is to monitor the latency present in the SQL server.  Usage of counters like the Average Disc Read and Average Disk Write, we would be able to come up with a latency metric. Along with these counters, the SQL Server DMVs will help you to monitor the latency and bottlenecks that are present in the system.

Resource monitor tool is yet another handy tool to investigate I/O bottlenecks. Performance tuning in SQL server deals with a standard set of existing tools that helps the DBA to help identify the error-prone areas.

3. SQL Queries

We have seen that some of the worse performance issues have been due to bad query plans and poorly written queries. These problems often stem from lack of experience in dealing with large scale enterprise database systems.

Response time for a query determines how fast the first record from the database is fetched. Tuning this is very important for an interactive application. However, for a batch processing system, the total time taken to fetch all the records must be tuned. This tuning can be performed by using the SQL query optimizer in the SQL Server.

You can know the best practices from the Microsoft’s technet platform

4. Database Segregation

The load caused by multiple databases running on the same server can be extremely high leading to a severe loss in application performance.

We have often noticed multiple databases like the staging, and the production database is present on the same server. SQL Server is also known to create a TempDB while performing grouping or sorting operations. Performance tuning in SQL server includes identifying such overlaps of multiple databases in a single SQL server and building strategies to segregate them.

5. Handling Indexes

Most of the times, indexes that have been created aren’t used. Valuable server resources are used in the building and maintenance of these indexes. As a part of Performance tuning, it is important to identify unused indexes and stop them from being created.

Index operations stats DMF can be used to view the usage of that indexes that are present on the SQL server. With this tool, it’s easy to discern the index usage details for each table. With answers to questions like “What indexes in a table are being used” and  “what is the usage pattern for a given index,”  it becomes easy to determine if an index is required or not.

Need help with Performance Tuning in SQL Server?

OptimizDBA has a team of experts that will work with your team to identify bottlenecks and establish strategies to solve the SQL Server issues with minimal impact on your daily operations.

Get in touch with us and let us help you improve your application performance.

Share this post