Query-Performance

Category: query-performance

Does a Clustered Index Give a Default Ordering?

Does a Clustered Index Give a Default Ordering?

By Kendra Little on February 2, 2018

I recently got a great question: if I order by a column where all rows in that column have the same value, will SQL Server then order the results by the clustered index key?

Continue reading

Auto-Tuning and the #1 Mindset Problem I Had as a DBA

Auto-Tuning and the #1 Mindset Problem I Had as a DBA

A few folks have asked: will auto-tuning and adaptive query plans mean the end of performance tuning jobs for SQL Server? In this week’s episode, I talk about why I’m excited about those features rather than afraid of them.

Digging into this problem, I share the #1 mindset problem I had as a DBA, why this mindset is so common among database professionals, and a daily habit that can change your approach to new technology.

Continue reading

Slowing Down Your Motor Mouth - Presentation Tips for Fast Talkers

Slowing Down Your Motor Mouth - Presentation Tips for Fast Talkers

on November 20, 2017

Are you worried that you talk too fast when you give a speech, talk, or presentation?

In this episode, I give you simple, practical tips that I’ve used to successfully improve the way I give presentations. Four years ago, I got frustrated feedback from listeners who had a hard time keeping up with my mouth; now I get congratulations that the pace was great.

Continue reading

How Do I Analyze a SQL Server Execution Plan?

How Do I Analyze a SQL Server Execution Plan?

on September 22, 2017

A query is slow, and you figure out how to collect the query execution plan. Now what?

In this video, I talk “big picture” about what execution plans are, what “cost” is, why to collect “compiled for” values, and the steps I take to analyze execution plans while performance tuning queries.

Continue reading

Do Index Changes Remove Execution Plans from Cache?

Do Index Changes Remove Execution Plans from Cache?

When you modify the indexes on a table, SQL Server needs to reconsider how it executes queries that reference that table. But the way this appears when you’re looking at your execution plan cache is far from obvious:

  • Impacted query plans are NOT removed from cache at the time you change an index. The next time the query is executed, it will be recompiled, and the new plan and related execution information will be placed in cache.
  • This is true whether or not the index is used by the query.
  • Even if the index is on columns in the table which are not referenced by the query, the query will recompile on the next run.

To see this in action, you can play along with this sample script.

Continue reading

Did that Query Eliminate Partitions? (videos)

Did that Query Eliminate Partitions? (videos)

Table partitioning makes execution plans a bit more confusing.

Free Course

I have a free online course which walks you through decoding execution plans, including whether or not partition elimination occurred.

Continue reading

New Free Webcasts on Interviewing and Indexing

New Free Webcasts on Interviewing and Indexing

on June 29, 2017

Sharpen your performance tuning and indexing skills this summer, for free, one week at a time!

Continue reading