Quantcast
Channel: Aaron Bertrand, Author at SQLPerformance.com
Browsing all 85 articles
Browse latest View live

SQL Server 2019 Cumulative Update #2

SQL Server 2019 Cumulative Update #2 is now available, with 134 fixes and improvements. Build # is 15.0.4013.40. The post SQL Server 2019 Cumulative Update #2 appeared first on SQLPerformance.com.

View Article


Image may be NSFW.
Clik here to view.

Removing the default trace – Part 1

In the spirit of Grant Fritchey's recent rants, and Erin Stellato's efforts since I think before we met, I want to get on the bandwagon to trumpet and promote the idea of ditching trace in favor of...

View Article


SQL Server 2019 Cumulative Update #3

SQL Server 2019 Cumulative Update #3 is available, with 56 enhancements. The build number is 15.0.4023.6. The post SQL Server 2019 Cumulative Update #3 appeared first on SQLPerformance.com.

View Article

Image may be NSFW.
Clik here to view.

Please help with STRING_SPLIT improvements

We're mid-cycle between releases, where we're not yet hearing about any of the features planned for SQL Server vNext. This is probably the best time to press Microsoft for improvements, as long as we...

View Article

Image may be NSFW.
Clik here to view.

Removing the default trace – Part 2

In the first post in this series, I showed the analysis I used to determine that the default trace is not for us. While looking at what information we actually needed to collect in its place (file size...

View Article


Removing the default trace – Part 3

In part 1 of this series, I explained how I arrived at the conclusion that we should disable the default trace. In part 2, I showed the Extended Events session that I deployed to capture all file size...

View Article

Image may be NSFW.
Clik here to view.

"0 to 60" : Switching to indirect checkpoints

In a recent tip, I described a scenario where a SQL Server 2016 instance seemed to be struggling with checkpoint times. The error log was populated with an alarming number of FlushCache entries like...

View Article

SQL Server 2019 Cumulative Update #4

SQL Server 2019 Cumulative Update #4 is available, with 50 enhancements. The build number is 15.0.4033.1. The post SQL Server 2019 Cumulative Update #4 appeared first on SQLPerformance.com.

View Article


Image may be NSFW.
Clik here to view.

Sometimes you CAN upsize a column in-place

Last year, Andy Mallon blogged about upsizing a column from int to bigint with no downtime. (Why this isn't a metadata-only operation in modern versions of SQL Server is beyond me, but that's another...

View Article


Image may be NSFW.
Clik here to view.

Please stop using this UPSERT anti-pattern

ul.f { margin-bottom:0px!important; } I think everyone already knows my opinions about MERGE and why I stay away from it. But here's another (anti-)pattern I see all over the place when people want to...

View Article

Image may be NSFW.
Clik here to view.

Parse parameter default values using PowerShell – Part 1

If you have ever tried to determine the default values for stored procedure parameters, you probably have marks on your forehead from hitting it on your desk repeatedly and violently. Most articles...

View Article

Image may be NSFW.
Clik here to view.

Parse parameter default values using PowerShell – Part 2

In my last post, I showed how to use TSqlParser and TSqlFragmentVisitor to extract important information from a T-SQL script containing stored procedure definitions. With that script, I left out a few...

View Article

Image may be NSFW.
Clik here to view.

Parse parameter default values using PowerShell – Part 3

In part 1 and part 2 of this series, I introduced ParamParser: a PowerShell module that helps parse parameter information – including default values – from stored procedures and user-defined functions,...

View Article


Image may be NSFW.
Clik here to view.

A use case for sp_prepare / sp_prepexec

There are features many of us shy away from, like cursors, triggers, and dynamic SQL. There is no question they each have their use cases, but when we see a trigger with a cursor inside dynamic SQL, it...

View Article

Image may be NSFW.
Clik here to view.

Performance of sys.partitions

sys.partitions appears to be a UNION ALL of two result sets (row store and columnstore) and most of my queries are resulting in two scans of sysrowsets. Is there any filter I can put on a query of...

View Article


Image may be NSFW.
Clik here to view.

Deprecated features to take out of your toolbox – Part 1

Microsoft is not in the habit of deprecating things these days, but when they do, it's for a reason – and it's certainly not because they want to make your life harder. On the contrary, it is almost...

View Article

Image may be NSFW.
Clik here to view.

Deprecated features to take out of your toolbox – Part 2

In my last post, I illustrated one reason you should stop using deprecated system tables like sysprocesses. This wasn't for performance reasons, directly, or to simply follow Microsoft's documented...

View Article


Image may be NSFW.
Clik here to view.

Deprecated features to take out of your toolbox – Part 3

ul.h, ul.w { margin:11px 22px!important; } ul.h li { display:inline-block; padding:9px 24px;font-family:Montserrat!important;font-weight:bold;font-size:1.125em;color:#444!important; } ul.h li:before {...

View Article

Image may be NSFW.
Clik here to view.

Split strings the right way – or the next best way

UPDATE: September 2nd, 2021 (Originally published July 26th, 2012.) A lot of things change over the course of a few major versions of our favorite database platform. SQL Server 2016 brought us...

View Article

Refreshing SQL Server Tables With Less Interruption Using Partition Switching

A common requirement in ETL and various reporting scenarios is to quietly load a SQL Server staging table in the background, so users querying the data aren’t impacted by the writes and vice-versa. The...

View Article
Browsing all 85 articles
Browse latest View live