Blog

"I don't care about best practices, I do what I want!"

“I don’t care about best practices, I do what I want!”

We write a lot about best practices, we teach customers best practices, and we publish popular references for best practices about all sorts of things like performance monitoring, SQL Server Setup, and Availability Groups.

But the internet is a sea of information and many SQL Server instances have unique needs. How does a SQL developer or DBA decide what’s a best practice?

How Most People Define Best Practices

In the real world, the #1 definition of a Best Practice in effect this: “Something we’ve been doing for years without noticing any problems.”

That’s just how human nature works. We all have a set of things we do that are “normal”, and we usually put them into our mental Best Practice Bucket. If we start to have problems, we assume it’s not due to anything “normal”.

Unfortunately, human nature makes people persist all sorts of bad practices. I find everything in the wild from weekly reboots to crazy settings in Windows and SQL Server that damage performance and can cause outages. When I ask why the settings are in place, I usually hear a story that goes like this:

  • Once upon a time, in a land far far away there was a problem
  • The people of the land were very unhappy
  • A bunch of changes were made
  • Some of the changes were recommended by someone on the internet. We think.
  • The problem went away
  • The people of the land were happier
  • We hunkered down and just hoped the problem would never come back
  • The people of the land have been growing more and more unhappy over time again

Most of the time “best practices” are implemented to try and avoid pain rather than to configure things well. And most of the time they aren’t thought out in terms of long term performance. Most people haven’t really implemented any best practices, they’ve just reacted to situations.

Why Best Practices Can Get You Fired

There’s one thing you can count on: many of yesterday’s best practices aren’t true today. Maybe the change you made long ago was a best practice at the time (or at least not an unusual or bad practice), but it may be hurting you now.

It doesn’t matter if something used to be a best practice or not. If times and technology have changed and you haven’t kept up, that outdated best practice can still get you fired if you don’t learn to let go.

What You Should Do Today

We try to make it easy for people to find out where their configuration veers away from current best practices.

Here’s what you should do today: run our free tool that checks your SQL Servers for signs you’re not following a best practice.

Look carefully and critically at everything that it points out. Don’t dismiss any of the items by saying, “oh, but we need that because we’ve always done it that way.” If it’s something you’ve been doing a long time, question it even more.

↑ Back to top
  1. Good article Kendra.It reminds me of a situation where a suggestion of having regular Index maintenance plan was made and my previous supervisor told not worry about that as we have been doing fine without having on for the last 10 years. The only issue was all of the databases were around 2-5 Gb and instance has approx. 100 databases with 128GB Ram, so, a significant performance problem was never really observed(if you do not mind between 2 seconds and 3 seconds query runtime).

    So, even though the tables were fragmented, they did not want to index defrags as they never did and the fact, we cannot do online reindex for ntext datatypes(yes,there were some ntext data types.) worried him.

  2. Agreed with Sapyam. Good article.
    I’m working (My 2nd week) on this place and i’m working on this database that is 120Gb and all tables (yessss all table) are heap. :-( now my manager wants to add a clustered index to a table that has 10500567 record on it. How do you think i should add a clustered index to this table without running out? thanks.
    Best practice, not on this place. all users have directly access to tables and 23 users (not DBA’s) can remote into the server box and make changes to it.
    the pay is good but i think that i might have to run away sooner or later. or it should be i good experience.

    • Hey,

      I see Jes answered your question about building the clustered index on the heap in another thread. I agree with her answer. :)

      As for whether to stay or run away, wow, that’s always an interesting question! It’s great to be able to make a difference and improve an environment, but if you’re not able to do so then that’s a tough situation to think about.

      Best of luck,
      Kendra

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

css.php