Advertising
Advertising

10 SQL Server Performance Tuning Tips to Make Your Database Soar

10 SQL Server Performance Tuning Tips to Make Your Database Soar

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

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 10 amazon review sites that will get you really good deals 10 Amazon Review Sites That Will Get You Really Good Deals

Trending in Technology

1 7 Tools to Help Keep Track of Goals and Habits Effectively 2 7 Clever Goal Tracker Apps to Make the Most of Your Business in 2019 3 10 Smartest Productivity Software to Improve Your Work Performance 4 18 Best Time Management Apps and Tools (2019 Updated) 5 16 Less Known Gmail Hacks That Will Super Boost Your Productivity

Read Next

Advertising
Advertising
Advertising

Last Updated on February 15, 2019

7 Tools to Help Keep Track of Goals and Habits Effectively

7 Tools to Help Keep Track of Goals and Habits Effectively

Now that 2011 is well underway and most people have fallen off the bandwagon when it comes to their New Year’s resolutions (myself included), it’s a good time to step back and take an honest look at our habits and the goals that we want to achieve.

Something that I have learned over the past few years is that if you track something, be it your eating habits, exercise, writing time, work time, etc. you become aware of the reality of the situation. This is why most diet gurus tell you to track what you eat for a week so you have an awareness of the of how you really eat before you start your diet and exercise regimen.

Tracking daily habits and progress towards goals is another way to see reality and create a way for you clearly review what you have accomplished over a set period of time. Tracking helps motivate you too; if I can make a change in my life and do it once a day for a period of time it makes me more apt to keep doing it.

So, if you have some goals and habits in mind that need tracked, all you need is a tracking tool. Today we’ll look at 7 different tools to help you keep track of your habits and goals.

Joe’s Goals

Advertising

     

    Joe’s Goals is a web-based tool that allows users to track their habits and goals in an easy to use interface. Users can add as many goals/habits as they want and also check multiple times per day for those “extra productive days”. Something that is unique about Joe’s Goals is the way that you can keep track of negative habits such as eating out, smoking, etc. This can help you visualize the good things that you are doing as well as the negative things that you are doing in your life.

    Joe’s Goals is free with a subscription version giving you no ads and the “latest version” for $12 a year.

    Daytum

      Daytum

      is an in depth way of counting things that you do during the day and then presenting them to you in many different reports and groups. With Daytum you can add several different items to different custom categories such as work, school, home, etc. to keep track of your habits in each focus area of your life.

      Advertising

      Daytum is extremely in depth and there are a ton of settings for users to tweak. There is a free version that is pretty standard, but if you want more features and unlimited items and categories you’ll need Daytum Plus which is $4 a month.

      Excel or Numbers

        If you are the spreadsheet number cruncher type and the thought of using someone else’s idea of how you should track your habits turns you off, then creating your own Excel/Numbers/Google spreadsheet is the way to go. Not only do you have pretty much limitless ways to view, enter, and manipulate your goal and habit data, but you have complete control over your stuff and can make it private.

        What’s nice about spreadsheets is you can create reports and can customize your views in any way you see fit. Also, by using Dropbox, you can keep your tracker sheets anywhere you have a connection.

        Evernote

        Advertising

          I must admit, I am an Evernote junky, mostly because this tool is so ubiquitous. There are several ways you can implement habit/goal tracking with Evernote. You won’t be able to get nifty reports and graphs and such, but you will be able to access your goal tracking anywhere your are, be it iPhone, Android, Mac, PC, or web. With Evernote you pretty much have no excuse for not entering your daily habit and goal information as it is available anywhere.

          Evernote is free with a premium version available.

          Access or Bento

            If you like the idea of creating your own tracker via Excel or Numbers, you may be compelled to get even more creative with database tools like Access for Windows or Bento for Mac. These tools allow you to set up relational databases and even give you the option of setting up custom interfaces to interact with your data. Access is pretty powerful for personal database applications, and using it with other MS products, you can come up with some pretty awesome, in depth analysis and tracking of your habits and goals.

            Bento is extremely powerful and user friendly. Also with Bento you can get the iPhone and iPad app to keep your data anywhere you go.

            Advertising

            You can check out Access and the Office Suite here and Bento here.

            Analog Bonus: Pen and Paper

            All these digital tools are pretty nifty and have all sorts of bells and whistles, but there are some people out there that still swear by a notebook and pen. Just like using spreadsheets or personal databases, pen and paper gives you ultimate freedom and control when it comes to your set up. It also doesn’t lock you into anyone else’s idea of just how you should track your habits.

            Conclusion

            I can’t necessarily recommend which tool is the best for tracking your personal habits and goals, as all of them have their quirks. What I can do however (yes, it’s a bit of a cop-out) is tell you that the tool to use is whatever works best for you. I personally keep track of my daily habits and personal goals with a combo Evernote for input and then a Google spreadsheet for long-term tracking.

            What this all comes down to is not how or what tool you use, but finding what you are comfortable with and then getting busy with creating lasting habits and accomplishing short- and long-term goals.

            Read Next