Performance Surprises and Assumptions : SET NOCOUNT ON
If you've ever used Management Studio, this output message will probably familiar: (1 row(s) affected) This comes from SQL Server's DONE_IN_PROC message, which is sent at the successful completion of...
View ArticleBad cardinality estimates from SSMS plans – redux
Over three years ago now, I posted about a fix to Plan Explorer regarding bad cardinality estimates that SQL Server's Showplan XML was producing, in the case of key/RID lookups with a filter predicate...
View ArticlePerformance Surprises and Assumptions : STRING_SPLIT()
Over three years ago now, I posted a three-part series on splitting strings: Split strings the right way – or the next best way Splitting Strings : A Follow-Up Splitting Strings : Now with less T-SQL...
View ArticleKnee-Jerk Performance Tuning : Incorrect Use of Temporary Tables
In this continuation of my "knee-jerk performance tuning" series, I'd like to discuss four common problems I see with using temporary tables. Any one of these problems can cripple a workload, so...
View ArticleSTRING_SPLIT() in SQL Server 2016 : Follow-Up #2
Earlier this week, I posted a follow-up to my my recent post about STRING_SPLIT() in SQL Server 2016, addressing several comments left on the post and/or sent to me directly: STRING_SPLIT() in SQL...
View ArticleIs a RID Lookup faster than a Key Lookup?
T-SQL Tuesday #78 is being hosted by Wendy Pastrick, and the challenge this month is simply to "learn something new and blog about it." Her blurb leans toward new features in SQL Server 2016, but...
View ArticleNumber of Rows Read / Actual Rows Read warnings in Plan Explorer
The new property “Actual Rows Read” in execution plans (which in SQL Server Management Studio is displayed as “Number of Rows Read”) was a welcome addition to performance tuners. It’s like having a new...
View ArticleSQL Server 2016 Temporal Table Query Plan Behaviour
Isn’t it great to have a new version of SQL Server available? This is something that only happens every couple of years, and this month we saw one reach General Availability. (Ok, I know we get a new...
View ArticlePaying Attention to Estimates
Last week I published a post called #BackToBasics : DATEFROMPARTS(), where I showed how to use this 2012+ function for cleaner, sargable date range queries. I used it to demonstrate that if you use an...
View ArticleAT TIME ZONE – a new favourite feature in SQL Server 2016
Image © Mark Boyle | Australia Day Council of NSW.Images property of respective artist(s). All rights reserved. This is such a cool feature and I hadn’t noticed it until recently, even though Microsoft...
View ArticlePattern Matching : More Fun When I Was a Kid
Growing up, I loved games that tested memory and pattern matching skills. Several of my friends had Simon, while I had a knock-off called Einstein. Others had an Atari Touch Me, which even back then I...
View ArticlePlan Explorer 3.0 Webinar – Samples and Q & A
Last Friday, I gave a webinar about Plan Explorer 3.0, the new features, and why we decided to eliminate the PRO edition and give away all the features for free. If you missed it, you can watch the...
View ArticleImplementing a custom sort
@rob_farley your recent stackoverflow solution to ordering by a value first then a field is genius! Wanted to thank you personally. — Joel Sacco (@Jsac90) August 11, 2016 I saw this tweet come...
View ArticleCan comments hamper stored procedure performance?
Every once in a while, a conversation crops up where people are convinced that comments either do or don't have an impact on performance. In general, I will say that, no, comments do not impact...
View ArticlePerformance Surprises and Assumptions : GROUP BY vs. DISTINCT
Last week, I presented my T-SQL : Bad Habits and Best Practices session during the GroupBy conference. A video replay and other materials are available here: T-SQL : Bad Habits and Best Practices One...
View ArticleOne way to get an index seek for a leading %wildcard
A performance issue I see often is when users need to match part of a string with a query like the following: ... WHERE SomeColumn LIKE N'%SomePortion%'; With a leading wildcard, this predicate is...
View ArticleFollow-up #1 on leading wildcard seeks
In my last post, "One way to get an index seek for a leading wildcard," I mentioned that you would need triggers to deal with maintaining the fragments I recommended. A couple of people have contacted...
View ArticleUsing AT TIME ZONE to fix an old report
As soon as I saw the SQL 2016 feature AT TIME ZONE, which I wrote about here at sqlperformance.com a few months ago, I remembered a report that needed this feature. This post forms a case study on how...
View ArticlePerformance Myths : Table variables are always in-memory
Guest Author : Derik Hammer (@SQLHammer) Recently Aaron Bertrand blogged about Harmful, Pervasive SQL Server Performance Myths. As an extension of this blog series, I am going to disprove this common...
View ArticleMulti-Statement TVFs in Dynamics CRM
Guest Author : Andy Mallon (@AMtwo) If you're familiar with supporting the database behind Microsoft Dynamics CRM, you probably know that it's not the fastest-performing database. Honestly, that...
View Article