Invitation for T-SQL Tuesday #20 – T-SQL Best Practices   48 comments


image

What is T-SQL Tuesday?

T-SQL Tuesday is the brain-child of MVP Adam Machanic (blog|twitter). It happens once a month on the 2nd Tuesday and is hosted by a different person in the SQL community each time. The idea is to get the SQL Community blogging on a common topic on a single day of the month after which a round-up of all the participating posts are done by the hosting blog owner to give the SQL community a one-stop shop of some great articles on a single topic.

What is the topic for July?

The topic for July is “T-SQL Best Practices”. If you work with SQL Server, then undoubtedly you would have had to write T-SQL queries atleast once or would have had to debug the seemingly useful piece of T-SQL code written by your developers to find out where the performance bottleneck or problem was. Your post for this month’s revolving blog party could be along one of the areas:

a. A set of T-SQL best practices that you follow in your shop that or you believe that should be followed always. It could be as specific as for writing only linked server queries or writing queries for SSIS packages etc.
b. An issue that you resolved because certain T-SQL best practices were not followed.
c. A workaround that you used (like query hints) to resolve an issue where T-SQL best practices couldn’t be implemented due to involvement of a third party solution.

Why did I choose this topic?

Over the years of troubleshooting SQL performance related issues, I have found on multiple occasions that the T-SQL query in question was performing badly because certain best practices for writing that piece of code were not followed and the one responsible for the development had not foreseen that such an oversight could become a bottleneck when the data or the number of users increased. So, I thought it would be a good idea to get the SQL Community’s thoughts around best practices in this area. Sometimes, the most obvious things are the easiest to overlook!

What are the Rules?

T-SQL Tuesday has some basic rules which are pretty easy to follow.

1. Your post must be published between 00:00 GMT Tuesday July 12, 2011, and 00:00 GMT Wednesday July 13, 2011.
2. Your post must contain the T-SQL Tuesday logo from above and the image should link back to this blog post.
3. Trackbacks should work, but if you don’t see one please link to your post in the comments section below so everyone can view your blog post.

Good-to-have

  • Include a reference to T-SQL Tuesday in the title of your post
  • Tweet about your post using the hash tag #TSQL2sDay
  • Being creative always fetches brownie points and gets a smile from the reader!

So now it’s time for:

SELECT [content] FROM [dbo].[tblbrain] WHERE [content_type] = ‘T-SQL’

Before I wrap-up this post, a big thanks to Adam for letting me host T-SQL Tuesday for this month!

About these ads

Posted July 5, 2011 by Amit Banerjee in Best Practices, T-SQL Tuesday, TSQL

Tagged with ,

48 responses to “Invitation for T-SQL Tuesday #20 – T-SQL Best Practices

Subscribe to comments with RSS.

  1. Thanks Amit, that is high praise! :) And thank you for hosting!

  2. Pingback: T-SQL Tuesday #20 – T-SQL Best Practices – Formatting versus “The process worked and that’s what matters most, right?” | The Blog for Jason E Bacani MBA (@JEBacaniSQLDude)

  3. Pingback: DataWarehouse Explorer

  4. Pingback: SQL SERVER – Database Worst Practices – New Town and New Job and New Disasters « Journey to SQLAuthority

  5. Great great subject.

    You continuously send me in my past with this subject.

    My congtribution:

    http://blog.sqlauthority.com/2011/07/12/sql-server-database-worst-practices-new-town-and-new-job-and-new-disasters/

    Once again many thanks Amit!

  6. Thank you for your post.

  7. Interesting thoughts and thank you for participating.

  8. Very good advice :)

  9. Thanks for posting.

  10. Sometimes these points are not followed even though people know them. Good to have them on paper.

  11. Thank you for posting.

  12. Pingback: T-SQL Tuesday #20 – T-SQL Best Practices | sqlity.net

  13. Here is mine’s. Amit thanks for gave such a great topic.

    http://sqlserverblogforum.blogspot.com/2011/07/t-sql-best-practice-sql-server.html

  14. T-SQL Tuesday #20 T-SQL Best Practices http://wp.me/pO66B-3g

  15. Thanks, Amit! You can find my post here: http://mattvelic.com/tsql-tuesday-20-best-practices/

  16. Amit, thank you for being the #tsql2day host, hopefully you enjoy the experience. You can find my post at http://www.sqlmashup.com/t-sql-tuesday-20-t-sql-best-practices

  17. Pingback: TSQL Tuesday #20: T-SQL Best Practices | Erin Stellato | Erin Stellato

  18. Here’s my contribution, in case the pingback doesn’t work. Thanks for hosting!

    http://awanderingmind.com/2011/07/12/t-sql-tuesday-20-best-practices-and-those-who-dont-follow-them/

  19. It’s the axe-wielding psychopath that makes it interesting, I know…

  20. Pingback: Aaron Bertrand : T-SQL Tuesday #20 : T-SQL Best Practices

It is always good to hear from you! :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,327 other followers

%d bloggers like this: