CHAPTER 4

image

Tuning for Better Performance

You have learned how to use the window function features of SQL Server 2005: ranking functions and window aggregates. Often, queries using window functions have better performance than using older methods such as self-joins and cursors. There are, however, some things you need to know to make sure your queries run as fast as possible when you use window functions.

In this chapter, you will learn what to look for in execution plans and how to create an index to help any query with a window function.

Using Execution Plans

Graphical execution plans make tuning T-SQL queries easier. You can compare the performance ...

Get Expert T-SQL Window Functions in SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.