Writing T-SQL - Common mistakes and assumptions compromising performance
2022TL; DR
Whether you're a DBA or a DEV, knowing this will help you get better performance
Session Details
This demo based performance session is for anyone who needs to write or analyse T-SQL code!
I'll share some real-world code patterns and their performance issues that I've come across over time and possible ways to fix them.
- Query is running slow? - Lets see how we can evaluate and improve it.
- Using the right data types is not for you? Maybe this will make you change your mind.
- Expecting partition elimination but it is not happening? - Maybe it is our fault! :)
- User-defined functions, common table expression, table value parameters, and much more!
In the end, you will understand the benefits of write T-SQL in the right way and that sometimes, using alternative techniques will outperform the most common approaches.
3 things you'll get out of this session
Speakers
Cláudio Silva's other proposed sessions for 2026
Accelerating Query Store data analysis with sp_QuickieStore - 2026
dbatools - Wheel of Fortune - 2026
Performance of a T-SQL query - The mystery, the investigation and the root cause! - 2026
Cláudio Silva's previous sessions
Let me show you why data types still matter
Selecting the right data types is still important. Let's see some examples of why!
Writing T-SQL code for the engine, not for you "more demos" by popular demand
Often because of how quickly we want to write a T-SQL query we create more extra work for the engine.
People underestimate the power of rewriting a T-SQL query, but in the right cases, it will provide better performance.
Let's look at some scenarios where this is true!
Hear me out - Don't go offline because of your index deployment strategy
Want to avoid downtimes or big blocking operations when managing indexes on busy systems?
In this session, we will talk about some common problems that can lead to unexpected downtimes and how we could avoid them.
Lift and Shift with dbatools - Azure SQL Managed Instance edition
Migrating from On-Prem SQL Server to Azure SQL Managed Instance requires a set of pre-requirements that can become much easier if we can validate and repeat the steps needed.
No matter if it's an Offline or Online migration, dbatools can make your life easier.
Administrating SSRS without boring web based clicks
Automate SSRS management using Microsoft's PowerShell module