Tuesday, October 4, 2016

SQL Best Practices

Following last week's post about SQL Forbidden Patterns, I also work with a list of Best Practices checklist that help developers to know what to do (and do not do) to get the best possible scripts and SQL solutions before hand them over to me for code review.




As you can see, they are related to the previous post I've been publishing here in the blog. I personally think they are very helpfull when developing SQL scripts, and most important of all, it ease my job ;-)


Wednesday, September 28, 2016

SQL Forbidden Patterns

A couple of years ago I had to give a class on SQL Forbidden Patterns that were raising among the developers at the company I work for. A couple of weeks ago I had to revisit that class, and I thought that it would be a good idea to share the class' content publicly. 

Inside the ZIP file you'll find info on how to avoid specific patterns that affect negatively the performance of the SQL server, and some other stuff that doesn't, but we had to specify a standard to avoid everyone going their own way (all with examples):


  • UDFs
  • Triggers
  • Cursors
  • Datatypes
  • Ranking Functions
  • WHERE/JOIN clauses
  • DISTINCT
  • String Delimiters
  • System Tables
  • IDENTITY
  • ID Values
  • DateTime format
  • GO Commands
  • Common mistakes

And here it is! SQL Forbidden Patterns

Let me know your thoughts on the comments section!

Special thanks to Guillaume Columeau, who helped me (back then) to build up the content of the course.