Quantcast
Channel: SQL Performance Archives - SQLPerformance.com
Browsing all 75 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

T-SQL bugs, pitfalls, and best practices – window functions

This article is the fourth installment in a series about T-SQL bugs, pitfalls and best practices. Previously I covered determinism, subqueries and joins. The focus of this month's article is bugs,...

View Article



Batch Mode Bitmaps in SQL Server

Background In traditional row-mode execution plans, SQL Server may introduce a Bitmap operator as part of performing early semi join reduction before a parallel hash or merge join. The bitmap is...

View Article

Image may be NSFW.
Clik here to view.

AMD EPYC 7002 Series Processors and SQL Server

On August 7, 2019, AMD finally unveiled their new 7nm EPYC 7002 Series of server processors, formerly code-named "Rome" at the AMD EPYC Horizon Event in San Francisco. This is the second generation...

View Article

Image may be NSFW.
Clik here to view.

Batch Mode Normalization and Performance

I briefly mentioned that batch mode data is normalized in my last article Batch Mode Bitmaps in SQL Server. All data in a batch is represented by an eight-byte value in this particular normalized...

View Article

Image may be NSFW.
Clik here to view.

T-SQL bugs, pitfalls, and best practices – pivoting and unpivoting

This article is the fifth part in a series about T-SQL bugs, pitfalls and best practices. Previously I covered determinism, subqueries, joins, and windowing. This month, I cover pivoting and...

View Article


Tuning SQL Server Reporting Services

Many database administrators find themselves having to support instances of SQL Server Reporting Services (SSRS), or at least the backend databases that are required for SSRS. For years SSRS was...

View Article

Image may be NSFW.
Clik here to view.

Nested Loops Joins and Performance Spools

Introduction Performance spools are lazy spools added by the optimizer to reduce the estimated cost of the inner side of nested loops joins. They come in three varieties: Lazy Table Spool, Lazy Index...

View Article

Overlooked T-SQL Gems

My good friend Aaron Bertrand inspired me to write this article. He reminded me of how sometimes we take things for granted when they seem obvious to us and don't always bother checking the full story...

View Article


Image may be NSFW.
Clik here to view.

Understanding Event Loss with Extended Events

My colleague, Erin Stellato, recently asked me a question about where and why event loss could happen with Extended Events. The question was the result of a comment someone had made on one of her blog...

View Article


Image may be NSFW.
Clik here to view.

Analyzing "death by a thousand cuts" workloads

There are multiple methods to look at poorly performing queries in SQL Server, notably Query Store, Extended Events, and dynamic management views (DMVs). Each option has pros and cons. Extended Events...

View Article

Image may be NSFW.
Clik here to view.

Row numbers with nondeterministic order

The ROW_NUMBER window function has numerous practical applications, well beyond just the obvious ranking needs. Most of the time, when you compute row numbers, you need to compute them based on some...

View Article

Image may be NSFW.
Clik here to view.

The Importance of Selecting the Proper Azure VM Size

Migrating an on-premises SQL Server instance to an Azure Virtual Machine (VM) is a common method to migrate to Azure. IT professionals are familiar with scoping the size of VMs with regards to vCPU,...

View Article

Image may be NSFW.
Clik here to view.

The Eager Index Spool and The Optimizer

Introduction An Eager Index Spool reads all rows from its child operator into an indexed worktable, before it starts returning rows to its parent operator. In some respects, an eager index spool is the...

View Article


Image may be NSFW.
Clik here to view.

Azure Virtual Machines for SQL Server Usage

One initial, easy step to moving your SQL Server on-premises workloads to the cloud is using Azure VMs to run your SQL Server workloads in an infrastructure as a service (IaaS) scenario. This removes...

View Article

Image may be NSFW.
Clik here to view.

Fun with (columnstore) compression on a very large table – part 1

Recently someone at work asked for more space to accommodate a rapidly growing table. At the time it had 3.75 billion rows, presented on 143 million pages, and occupying ~1.14TB. Of course we can...

View Article


Image may be NSFW.
Clik here to view.

Fun with (columnstore) compression on a very large table – part 2

In part 1, I showed how both page and columnstore compression could reduce the size of a 1TB table by 80% or more. While I was impressed I could shrink a table from 1TB to 50GB, I wasn't very happy...

View Article

Image may be NSFW.
Clik here to view.

Why Wait Stats Alone Are Not Enough

"Waitstats helps us identify performance-related counters. But waits information by itself isn't enough to accurately diagnose performance problems. The queues component of our methodology comes from...

View Article


Image may be NSFW.
Clik here to view.

Finding Distinct Values Quickly

Back in 2014, I wrote an article called Performance Tuning the Whole Query Plan. It looked at ways to find a relatively small number of distinct values from a moderately large dataset, and concluded...

View Article

Image may be NSFW.
Clik here to view.

Bandwidth-friendly Query Profiling for Azure SQL Database

SQL Server has always provided the ability to capture live queries on an ad hoc basis in an easily-consumable rowset format – first with legacy SQL Server Profiler, later via Extended Events in SSMS....

View Article

New Metadata-Only Column Changes in SQL Server 2016

The ALTER TABLE ... ALTER COLUMN command is very powerful. You can use it to change a column's data type, length, precision, scale, nullability, collation…and many other things besides. It is certainly...

View Article
Browsing all 75 articles
Browse latest View live




Latest Images