Select Page

Solving SQL Server Issues: The Long Road

Author: Andy McDermid | | October 7, 2014

You can easily resolve some issues related to SQL Server performance, but there are others that require more time and resources. Implementing these performance solutions may require some planning or perhaps a service outage. Once configurations are adjusted, they may need long-term monitoring or ongoing adjustments to succeed. That’s why we call these solutions “The Long Road.”

There are four issues under this umbrella: file locations, virtual log files, tempdb files, and missing index DMVs.

File Location

File location is an important aspect of good database architecture. For example, locating system and user database files on the same disk creates problems in case data needs to be recovered. If that single disk goes down, all the information may be lost, but if the files are on separate disks, the situation is isolated. Also, From an organizational standpoint, it makes good sense to separate these types of files.

You may want to carefully consider using autogrow with SQL Server. If you’re considering using the default values for database size and growth in Autogrow, you may want to rethink this. These types of initial configurations typically persist well after the database has grown into full production mode. If a database is active, using the feature may result in continual growth commands being issued for the file. Proper sizing and instituting growth procedures as needed — in off-hours — is a better option.

Virtual Log Files

Misconfigured Autogrow settings may also cause an excess of virtual log files in the transaction log. When a log file grows, it grows in virtual log file ”chunks”. Similarly, when a log file is truncated or shrinks, this also affect the virtual log files. An excessive number of virtual log files can create unnecessary overhead, which translates into longer recovery times. The ideal approach, as with Autogrow, is to manually size the transaction log files. Of course, resizing may be part of a larger initiative to reduce virtual log file counts.

Tempdb Files

Another issue is the number of files needed for tempdb. You may read several suggestions about how to implement tempdb, but the ideal is to have as many files as needed to eliminate page allocation contention. Every time tempdb is used, the thread accessing tempdb must first find adequate free space to build the temp object. Because tempdb is a shared resource, a bottleneck can develop when many threads need tempdb space.

A good solution is to distribute the load by adding more tempdb files. Proceed carefully. If there are too many tempdb files, this can create memory issues.

Missing Index DMVs

Missing index Dynamic Management Views is one of the more underused features in SQL Server. These types of DMVs — sys.dm_db_missing_index_group_stats, sys.dm_db_missing_index_groups, sys.dm_db_missing_index_details, and sys.dm_db_missing_index_columns — allow a database administrator to discover the indexes the SQL query engine would have used had they been available. The missing index information can be reviewed later for possible implementation.

These missing index reports do have some limitations. Database administrators need to carefully proceed to prevent the production of needlessly large or duplicate indexes. A best practice is evaluating each suggested missing index.

These and other solutions designed to help you more fully leverage the time and resources invested in your SQL Server are discussed in detail in a white paper written by Andy McDermid, Datavail’s SQL Server principal database administrator.

You may also wish to explore how a comprehensive health check can help your organization. The Datavail Health Check is a tool you can readily use to increase your system’s operating efficiencies.

To learn more about long road performance tuning or our health checks, please contact Datavail.

Image by markusgann/123RF.

How to Solve the Oracle Error ORA-12154: TNS:could not resolve the connect identifier specified

The “ORA-12154: TNS Oracle error message is very common for database administrators. Learn how to diagnose & resolve this common issue here today.

Vijay Muthu | February 4, 2021

Data Types: The Importance of Choosing the Correct Data Type

Most DBAs have struggled with the pros and cons of choosing one data type over another. This blog post discusses different situations.

Craig Mullins | October 11, 2017

How to Recover a Table from an Oracle 12c RMAN Backup

Our database experts explain how to recover and restore a table from an Oracle 12c RMAN Backup with this step-by-step blog. Read more.

Megan Elphingstone | February 2, 2017

Subscribe to Our Blog

Never miss a post! Stay up to date with the latest database, application and analytics tips and news. Delivered in a handy bi-weekly update straight to your inbox. You can unsubscribe at any time.

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.


Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.