Category Archives: T-SQL

What is a Partitioned View?

Back when I first began working with SQL Server in 1998, the databases I worked with could be measured in megabytes. I remember being a bit concerned when a database for one of my customers approached 1 GB. In today’s … Continue reading

Posted in T-SQL, T-SQL Window Functions | 1 Comment

Code and Slides for Nebraska.Code() Conference

Thursday at Nebraska.Code() Conference, I taught a workshop on T-SQL Query tuning. It was a great afternoon. Here are the files. I also presented my T-SQL Window Function session on Friday afternoon. Files for that presentation are here.

Posted in T-SQL, T-SQL Window Functions | 5 Comments

When the Performance of LAG Lags Behind

My favorite T-SQL windowing functions are LAG and LEAD. LAG and LEAD let you take a peek at another row and grab any column you need in your results. They are easy to use and perform great…except when they don’t. … Continue reading

Posted in T-SQL, T-SQL Window Functions | Leave a comment