Blogs

Finding Queries that Cause Wait Stats in SQL Server

Finding Queries that Cause Wait Stats in SQL Server

You’ve got some troubling wait stats in SQL Server. How can you tell which queries are causing those waits?

Learn the pros and cons of different techniques to track down the cause of both common and tricky waits in SQL Server, including CXPACKET, PAGEIOLATCH, LCK, RESOURCE_SEMAPHORE, and THREADPOOL waits.

Continue reading

When a Nonclustered Index and Statistics Make a Query Slower

When a Nonclustered Index and Statistics Make a Query Slower

on May 24, 2017 • 8 min read

Nonclustered indexes are awesome in SQL Server: they can get you huge performance gains.

But we can’t always create the perfect index for every query. And sometimes when SQL Server finds an index that isn’t quite perfect and decides to use it, it might make your query slower instead of faster.

Continue reading

Removing Query Hints with Plan Guides (Dear SQL DBA Episode 43)

Removing Query Hints with Plan Guides (Dear SQL DBA Episode 43)

on May 18, 2017 • 2 min read

If you need to add, remove, or replace hints from ad-hoc queries where you can’t change the code, plan guides can help. See a demo of removing a query hint from parameterized TSQL run from an application, and get tips on how to make your plan guides work in SQL Server.

Continue reading

Perfmon: Batch Requests/sec counts whole batches, not statements

Perfmon: Batch Requests/sec counts whole batches, not statements

on May 16, 2017 • 1 min read

Category: perfmon , sql-server

The name of the “SQL Statistics \ Batch Requests/sec” counter is confusing: exactly what is a request? The request is the WHOLE batch. See a demo of this counter in this quick 5 minute video.

Continue reading

Batch Mode Hacks for Rowstore Queries in SQL Server

Batch Mode Hacks for Rowstore Queries in SQL Server

By Kendra Little on May 11, 2017 • 4 min read

What’s batch mode?

Batch mode was introduced as a way to help SQL Server process data from columnstore indexes faster. The whole idea with columnstore is that you pull big compressed sets of rows out for aggregation or other operations in big chunks.

Batch mode is a way that operators can work on a “batch” of up to 900 values at a time, instead of working on individual rows. Batch mode can reduce the overhead of metadata and make more efficient use of your CPUs.

Continue reading

New Course! Query Tuning with Hints & Optimizer Hotfixes

New Course! Query Tuning with Hints & Optimizer Hotfixes

on May 10, 2017 • 1 min read

Want to up your query tuning game? For a limited time, you can snag a free enrollment to the new course, Query Tuning with Hints & Optimizer Hotfixes.

About the Course

Learn the pros and cons of using hints and optimizer hotfixes in SQL Server, and see how hints can give you insight into the optimization process. Sorry, this free giveaway has ended.

Continue reading

SQLServer:Databases(_Total)\Transactions/sec vs SQL Statistics\Batch Requests/sec (video)

SQLServer:Databases(_Total)\Transactions/sec vs SQL Statistics\Batch Requests/sec (video)

on May 8, 2017 • 1 min read

Perfmon counters are great for measuring workload, but choosing which counter to baseline can be confusing.

Continue reading