Query-Performance

Category: query-performance

Join me for Why Did My Clever Index Change Backfire? at the 24 Hours of PASS

Join me for Why Did My Clever Index Change Backfire? at the 24 Hours of PASS

on June 23, 2017

You’ve got a performance problem and you know just the cool index trick that will fix it!

Until it goes utterly wrong.

Join me for this free session in the 24 hours of PASS to see multiple quick demos of index changes that seem like a great idea… until they either don’t work, or make things worse.

How to sign up

My session is on Wed, July 19, 9 am Pacific / 12 pm Eastern / 4pm UTC.

Continue reading

When does physical reads include read-ahead reads in SQL Server?

When does physical reads include read-ahead reads in SQL Server?

SQL Server has more than one way to pull pages in from disk for your queries. SQL Server can do a physical read of an 8KB page, or an extent of 8 ย of those 8KB pages.

Continue reading

Register for Upcoming Free Webcasts on Indexes, Stats Maintenance, Query Tuning, and More

Register for Upcoming Free Webcasts on Indexes, Stats Maintenance, Query Tuning, and More

on June 2, 2017

I’ve got a whole bunch of free, live webcasts scheduled on SQL Server training! I’d love for you to join me for these sessions.

Continue reading

Batch Mode Hacks for Rowstore Queries in SQL Server

Batch Mode Hacks for Rowstore Queries in SQL Server

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

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

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

Continue reading

Are Bad Statistics Making My Query Slow? (Dear SQL DBA Episode 39)

Are Bad Statistics Making My Query Slow? (Dear SQL DBA Episode 39)

An important query is suddenly slow. Is it because statistics are out of date? This is tricky to figure out, and updating statistics right away can make troubleshooting even harder. Learn how to use query execution plans to get to the heart of the question and find out if stats are really your problem, or if it’s something else.

In this 35 minute episode:

  • 00:39 SQL Server 2017 Announced
  • 01:10 New video from Microsoft’s Joe Sack demonstrating Adaptive Query Processing
  • 03:05 This week’s question: Are bad stats making my query slow?
  • 05:26 Demo of finding plan in cache and analyzing stats begins
  • 28:17 What to do when stats ARE the problem

Code samples are at the bottom of the page

Continue reading

Index Maintenance and Performance (Dear SQL DBA Episode 38)

Index Maintenance and Performance (Dear SQL DBA Episode 38)

on April 13, 2017

They made their index maintenance job smarter, and their queries got slower in production afterward. Could the index maintenance have harmed performance?

Continue reading