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.
Thanks to everyone who joined me yesterday afternoon in Cambridge for my Clash of the Row Goals talk. It was great to receive such a welcome reception for a rather out there topic.
Three things I should clarify for those who attended:
- The Many() function appeared to create an invalid estimate in one case; but that was due to auto-parameterization (which one of the attendees in the front row correctly called out at the time; but I'm not sure everyone heard her)
- Regarding the demo that failed at the end: As it turns out -- it didn't! I was a bit under-caffeinated and misunderstood my own notes. I've updated the scripts to make things clearer.
- I blamed the demo failure, jokingly, on Azure. Turns out at least one attendee took me seriously; it showed up on a feedback card. Fact is, I was running the entire show from my laptop. My head might have been in the clouds, but my demos were strictly on terra firma.
The demo scripts are attached. Enjoy, and let me know if you have any questions or comments. I'd especially love to hear how it goes if you decide to try any of these techniques on one of your problem queries.
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
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.