THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Adam Machanic

Adam Machanic, Boston-based SQL Server developer, shares his experiences with programming, monitoring, and performance tuning SQL Server. And the occasional battle with the query optimizer.

SQL Saturday Chicago (#291) - Clash of the Row Goals - Demos

Thank you to everyone who joined me today at SQL Saturday Chicago for my "Clash of the Row Goals" session. I'm honored that so many people would attend a talk with such an incredibly arcane title -- and always glad to find a curious, interested, and intelligent audience.

The demos I showed during the session are attached to this post. If you have any followup questions, feel free to leave a comment below.


Published Saturday, April 26, 2014 4:37 PM by Adam Machanic


Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



Daniel K said:

Hi Adam,

one Thing about adventureworks and your Demos (02_logic.sql): Microsoft changed this sample db, Employee Table does not have the column ManagerId anymore. So People who download a fresh Version from here: cant run your Demos.

Here is a description how one can recreate it , also sqlblog ;-)

But I could understand (and reproduce with another column) the concept, that ist better to Aggregate before the join.

Maybe, you could provide a source for an "old" adventureworks or Change the script to the new Version, for future Demos?

I couldn't be at the sessions, so I am trying to understand the ideas from the demos/queryplans. Hope that works ;-)



April 29, 2014 7:42 AM

Dave Gugg said:

Hey Adam

I loved your presentation.  Unfortunately, I just started a new job where all the SQL comes straight from 3rd party applications, so I won't be able to use this anytime soon.  I can think of tons of examples from my previous job where I could have used this instead of creating temp tables and joining them to ensure join order.

Thanks again for the presentation.

April 29, 2014 12:59 PM

Dave Gugg said:

PS, I'd love to see a blog post about how a DBA can get into consulting.  I've been intrigued by the idea, but I'm not sure the path one takes.

April 29, 2014 1:00 PM

Dave Gugg said:

Hey, quick follow up.  I finally got an opportunity to use what you showed here, and I was able to reduce a SP used for grabbing reporting data from 414,479 CPU and 309,684,392 reads to 733 CPU and 19,891 reads.  Sweet!

July 10, 2014 12:36 PM

Leave a Comment


About Adam Machanic

Adam Machanic is a Boston-based SQL Server developer, writer, and speaker. He focuses on large-scale data warehouse performance and development, and is author of the award-winning SQL Server monitoring stored procedure, sp_WhoIsActive. Adam has written for numerous web sites and magazines, including SQLblog, Simple Talk, Search SQL Server, SQL Server Professional, CoDe, and VSJ. He has also contributed to several books on SQL Server, including "SQL Server 2008 Internals" (Microsoft Press, 2009) and "Expert SQL Server 2005 Development" (Apress, 2007). Adam regularly speaks at conferences and training events on a variety of SQL Server topics. He is a Microsoft Most Valuable Professional (MVP) for SQL Server, a Microsoft Certified IT Professional (MCITP), and an alumnus of the INETA North American Speakers Bureau.

This Blog


Privacy Statement