The Good, The Bad and The Avoidable

Submitted by Michal Poreba

Talk Abstract:

Code quality matters!

You probably have worked with SQL queries before. What was the experience like? Have you ever looked at a piece of SQL and thought... G! that's ugly! Have you seen a query that worked just fine in development but annoyingly not in production, or it used to work for a while, but then started timing out without any change or a warning?

This session is for you! Let's take a hard look at code quality on an example from a language nobody loves, the T-SQL. I will show you some ugly queries and teach you how to transform them into good, clean code, that not only looks right but also performs well.

About Michal Poreba

Michał Poręba is a sort of a DBA who spends more of his time writing C#, PowerShell, JavaScript or even Ruby code than he does writing SQL queries. Server administration can and should be automated, performance is best addressed by good system design and implementation, and working with teams of developers is simply a much more fun way of spending time in an office than looking at Management Studio.

He lives in Wales where he currently works as a Senior SQL Server DBA at Vizolution in Swansea. In his free time, he speaks obscure languages, plays music with code or dives in local caves trying to find places no human has ever been to before. An intermittent blogger at, and a once-in-a-while contributor to a few OSS projects.