Kendra Little

kendra little

Does Truncate Table Reset Statistics?

Does Truncate Table Reset Statistics?

Short answer: the SQL Server optimizer will know that the table was truncated, but statistics might not update when you expect.

For the long answer, let’s walk through an example using the WideWorldImporters sample database.

Continue reading

Filtered Indexes: Rowstore vs Nonclustered Columnstore

Filtered Indexes: Rowstore vs Nonclustered Columnstore

By Kendra Little on November 10, 2016

Category: indexing

SQL Server has two types of filtered indexes:

  1. The “classic” filtered nonclustered rowstore index, introduced in SQL Server 2008, available in all editions
  2. The newfangled filtered nonclustered columnstore index, introduced in SQL Server 2016, available in Enterprise Edition

Continue reading

Decoding Key and Page WaitResource for Deadlocks and Blocking

Decoding Key and Page WaitResource for Deadlocks and Blocking

If you use SQL Server’s blocked process report or collect deadlock graphs, occasionally you’ll come across things that look like this:

waitresource=“PAGE: 6:3:70133 " waitresource=“KEY: 6:72057594041991168 (ce52f92a058c)”

Continue reading

Books to Learn SQL Server Performance Tuning and Database Design

Books to Learn SQL Server Performance Tuning and Database Design

By Kendra Little on October 11, 2016

I get a lot of requests about which books are helpful to learn performance tuning and database design. I totally get that – I still like learning with books. It doesn’t mean training videos or blogs are any less cool. They can all work together.

Continue reading

Can I Use Statistics to Design Indexes? (Dear SQL DBA Episode 18)

Can I Use Statistics to Design Indexes? (Dear SQL DBA Episode 18)

By Kendra Little on October 6, 2016

Should you look at automatically created statistics on  your tables in SQL Server to help you design better indexes? Learn why in this 20 minute video, or subscribe to the Dear SQL DBA podcast.

No time to watch? Scroll on down, everything is written in article form below the video.

Here’s this week’s question:

Continue reading

Deadlock Code for the WideWorldImporters Sample Database

Deadlock Code for the WideWorldImporters Sample Database

If you haven’t checked out Microsoft’s new WideWorldImporters sample database for 2016, it’s a pretty cool new little database. The database makes it easy to play around with new 2016 features, and it even ships with some cool little executables to run inserts in the “workload-drivers” folder.

Continue reading