Category : T-SQL - SentryOne Team Blog

Category: T-SQL

Rob Farley : Using AT TIME ZONE to fix an old report

Rob Farley : Using AT TIME ZONE to fix an old report

Rob Farley (@rob_farley) contributes to T-SQL Tuesday #87, showing how he would use AT TIME ZONE to simplify reports based on an end user's time zone.

T-SQL Tuesday #87 : Shiny New Toys

T-SQL Tuesday #87 : Shiny New Toys

For T-SQL Tuesday #87, Aaron Bertrand (@AaronBertrand) talks about two shiny new toys used for disassembling and reassembling strings: STRING_SPLIT() and STRING_AGG().

Follow-up #1 on leading wildcard seeks

Follow-up #1 on leading wildcard seeks

Aaron Bertrand (@AaronBertrand) shows how to implement simple triggers that maintain trigram-type tables used for better supporting wildcard searches.

One way to get an index seek for a leading %wildcard

One way to get an index seek for a leading %wildcard

In an effort to make leading wildcard searches sargable, Aaron Bertrand plays around with a trigram-type implementation in SQL Server.

Performance Surprises and Assumptions : GROUP BY vs. DISTINCT

Performance Surprises and Assumptions : GROUP BY vs. DISTINCT

Aaron Bertrand acknowledges that DISTINCT and GROUP BY are usually interchangeable, but shows there are cases where one performs better than the other.

Bad Habits Revival

Bad Habits Revival

Aaron Bertrand (@AaronBertrand) breathes some new life into his long-running SQL Server series on bad habits and best practices. The latest installment discusses the various impacts of choosing GUIDs over numeric types for keys.

Photo credit: badgreeb_records

SQL Server v.Next : STRING_AGG Performance, Part 2

SQL Server v.Next : STRING_AGG Performance, Part 2

Aaron Bertrand (@AaronBertrand) starts digging deeper into the performance of string concatenation methods STRING_AGG and FOR XML PATH.

SQL Server v.Next : STRING_AGG() performance

SQL Server v.Next : STRING_AGG() performance

Aaron Bertrand takes an initial look at the performance of a new function, STRING_AGG, in SQL Server v.Next CTP 1.1.

Can comments hamper stored procedure performance?

Can comments hamper stored procedure performance?

After a recent conversation on Twitter, Aaron Bertrand shows where excessive comments in your stored procedures might have an impact on performance.

#BackToBasics : CAST vs. CONVERT

#BackToBasics : CAST vs. CONVERT

Aaron Bertrand (@AaronBertrand) explains why he always opts for one of these options over the other, even in cases where it shouldn't matter.

Slides and Demos from SQLintersection

Slides and Demos from SQLintersection

Aaron Bertrand shares his slides and demos from presentations at SQLintersection in Las Vegas.

Rob Farley : Implementing a Custom Sort

Rob Farley (@rob_farley) discusses some solutions and gotchas for implementing a custom sort using ORDER BY in T-SQL queries.

#BackToBasics : Why I use lower case for data type names (now)

Aaron Bertrand (@AaronBertrand) explains why he codes defensively – matching the case of data type names, even in scenarios where it isn't strictly necessary.

Paul White : The Sort that Spills to Level 15,000

Paul White shows that SQL Server sometimes produces very misleading information about the impact of sort operations.

Pattern Matching : More Fun When I Was a Kid

Aaron Bertrand talks about pattern matching, a childhood game called Simon, and the unpredictability of CHARINDEX vs. LIKE.