SQL SERVER - 15 Best Practices for Better Database Performance(blog.sqlauthority.com)

submitted by pinaldavepinaldave(9662) 4 years, 1 month ago

I have written 14 best practices here, read them all and let me know what is as per your opinion should be the 15th best practice.

3 comments |category: |Views: 46

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by shrutishruti(0) 4 years, 1 month ago 0

First of all good one Pinal,

I can think of following few points to add as 15th.

1. if using idexed, look closely at your where statement to make sure columns in where clause are properly ordered.
2. Work with Linked servers whenever possible.
3. If working with large databses use NOLOCK in queries.
4. Use of Begin Tran and Commit Tran would help in large updates on production database.

Pinal,
Please let me know if any one of above points seems incorrect.

Thanks,
Shruti

Reply

posted by pinaldavepinaldave(9662) 4 years, 1 month ago 0

Great Comment Shruti.

Reply

posted by RPentonRPenton(40) 4 years, 1 month ago 0

3 - I have debates with myself over this one. Yes, it makes sense from a data-integrity point of view, but at the same time it encourages code duplication, which is a very bad thing in my opinion.

9 - I disagree. CAPITAL LETTERS are difficult to read. The only reason SQL used this to start with is because syntax highlighting hadn't been invented yet. Now that it has, there's really no reason to use them anymore.

11 - Very much disagree. SP's have no performance or security advantages over ad-hoc queries, and creates codebases which are a nightmare to maintain.

Reply

information Login or create an account to comment on this story