Performance Tuning / SQL Server DBA / sqlLAB

Writing Scalable Queries with T-SQL Ranking Functions

More frequently, I am coming across code that incorporates the various ranking functions now available in T-SQL. These functions have been around for a while and provide ways to include explicit ranking columns in query results. For example, in a race with three runners you could return their rank (1, 2, 3) with the following: … Continue reading

Performance Tuning / SQL Server DBA / sqlLAB

SQL Query Tuning: Non-SARGable Conditions & Optimising Joins

Recently I got the chance to do some query tuning for a client. The client had contacted us because their users were experiencing particularly slow performance running reports from their BI Dashboard. Their internal teams thoroughly reviewed their network and SSRS packages and couldn’t find anything untoward. When they dug deeper into one particularly slow … Continue reading