Advertising

10 SQL Server Performance Tuning Tips to Make Your Database Soar

10 SQL Server Performance Tuning Tips to Make Your Database Soar
Advertising

Regular maintenance and upgrades are an essential parts of ensuring that databases and servers maintain their usability. Many common practices come with a high price and low results, and many developers have begun using alternative methods to improve the performance of their server.

Query tuning can fix queries that have been poorly written and indexes that are not efficient. Use these 10 tips to improve your database in a snap.

1. Separate Data and Log Files

This practice is often overlooked for no good reason. The data and log files should be separated into different physical drives arrays whenever possible, especially when using DAS or SAN. The purpose is to separate the random access of data from sequential access, that happens when writing transaction logs.

Advertising

Sometimes, drives are carved from the same larger disk array rather than different physical drives, which defeats the purpose of separating them.

2. Limited Data Selection

A query will run faster when there is less data to be retrieved. Do as much filtering that you can on the server’s end. Less data will be sent and results can be seen faster. For example, even the smallest changes like removing the term “City” from “New York City” will improve the SQL server performance.

3. Don’t Shrink the Data Files

Shrinking data files is a bad practice in general and can impact performance in a few ways, including fragmentation and causing the queries to suffer. If Instant File Initialization isn’t turned on, the resulting growth can negatively impact performance and cause timeouts. There may be times when shrinking data files is needed, but be sure to know the impact before you take action on it.

Advertising

4. Database Statistics

An optimizer will analyze the statistics and choose the least expensive path, in order to satisfy a query. Statistics that are outdated or missing will cause a prolonged response time because the path chosen will be less optimized.

5. Predetermine the Expected Growth

You can minimize the negative effect of indexes by specifying the appropriate fill factor value when indexing. When the value of a table is changed, the database has to reorganize the data stored to account for the new rows. If you are expecting regular additions of new rows, you can specify this growth for an index.

6. Alter the MAX Memory Limit

64-bit versions of SQL Servers have seen recent improvements in terms of allocating memory and sharing with an operating system, but leaving the MAX memory setting at default is not ideal.

Advertising

You should set the MAX memory setting at a minimum of 1 or 2GB less than the total amount of memory on the server. How much memory you leave will depend on the programs that you have running and how much memory those require.

7. Stick With Single Changes

Rather than making many changes at one time and risking the effectiveness of your query, aim to find the most expensive queries and then adjust the query based on this. Making small changes one at a time will more likely produce optimal results.

8. Before Loading Data, Drop Indexes

This will aid the insert statement in running faster. Once the inserts are done, you can remake the index. Use a temporary table to load data if you are going to insert thousands of rows in a system. Moving data from one table to another is much quicker than loading it from an external source.

Advertising

9. Utilizing Constraints

Advanced query analysis can benefit from knowing and using constraints. Avoid overlapping or duplicating indexes by reviewing existing indexes, keys and constraints. Information for existing indexes can be accessed by running sp_helindex.

10. Extra Columns

When there are extra columns within the database, the system will perform poorly. This is because, it becomes increasingly difficult for the execution of the process to use specific operations of the index. To find any additional columns, use the SELECT* or scalar functions to closely examine the query.

More by this author

Sasha Brown

Seasoned Blogger

Top 5 Easy-to-Use Accounting Software for Small Businesses Top 5 Easy-to-Use Accounting Software for Small Businesses 11 Obvious Signs He Wants to Marry You 11 Signs He Wants to Marry You (Even You Are at the Early Stages) 11 Must-Follow Natural Health Blogs for 2017 11 Must-Follow Natural Health Blogs for 2017 11 Tools to Help You Keep Track of Your Remote Employees 11 Tools to Help You Keep Track of Your Remote Employees 7 Ways to Effectively Cope With Emotional Stress Seven Ways to Effectively Cope with Emotional Stress

Trending in Technology

1 Can Technology have Biases Like Humans? 2 15 Great Macbook Accessories To Improve Productivity 3 7 Best Outdoor Security Cameras For Better Home Security 4 10 Best VPNs to Browse the Internet More Securely 5 10 Best Monitors for Your PC Under $100

Read Next

Advertising
Advertising

Last Updated on December 18, 2020

Can Technology have Biases Like Humans?

Can Technology have Biases Like Humans?
Advertising

Technology has taken a vantage leap in providing solutions for man. Before now, technology used to appear complex and would require a great deal of expertise to handle solutions available. Today, we have technology applicable in the simplest human activities as smart products with intelligent algorithms powering them as they make error-free judgments and provide intelligent and analytic solutions.

Does technology have all the answers?

This article from Credit Suisse, tells us that technology does not have all the answers because it has been found to exhibit “similar biases,” as humans. No one can discredit the impact of technology, but it is not totally free of human input and this is the reason we experience these biases in many areas we have technology holding foot.

Advertising

Creating technological solutions transparently

This article suggests that the process of creating technological solutions be made transparent and subject to contribution from many people who would end up as users of the product – male, female, young, old, learned, unlearned and all other preferences as we have them. It also underscores the importance of having women on product development teams. This approach is not sure to eliminate all forms of bias, but it is a good way to start in order to appraise the full benefits of technology.

Advertising

Technology as the connecting tool

Technology so far has been a major connecting tool amongst us humans. It is used and appreciated by all regardless of race, language and sex. In order to keep it less subjective to these arguments about human biases. I believe we should gather opinions on products and solutions before making them available to the public. This could be done by gathering input from intended target users and receiving feedback across the stages of production.

Advertising

“Recognizing the problem is a start…success will depend on inclusive technologies that meet this vast untapped market.” This cannot be more apt especially at a time when we look up to technology for solutions. We should not muzzle our progress with technology by battling algorithm bias. The first way to avoid this battle is by reading this article here.

Advertising

Advertising

Read Next