Sql-Server

Category: sql-server

Auto-Tuning: Automatic Plan Correction is Cleared on Restart

Auto-Tuning: Automatic Plan Correction is Cleared on Restart

The new Enterprise Automatic Tuning feature in SQL Server 2017 may sound intimidating at first – one question I get a lot lately is whether or not there’s a future for DBAs. Will Auto-Tune mean we don’t need any more human tuning?

Well, not anytime super soon.

Continue reading

Why Is My Function Missing From sys.dm_exec_query_stats and Query Store?

Why Is My Function Missing From sys.dm_exec_query_stats and Query Store?

I just spent 90 minutes of my life figuring out a detail about sys.dm_exec_query_stats which I’m pretty sure I figured out five years ago, but didn’t write a blog post about.

Time to write a blog post, so I can save time when I go searching for this in a couple years.

Continue reading

The Case of MAX() Requiring an Index Scan, While TOP(1)/ORDER BY  DESC Does Not

The Case of MAX() Requiring an Index Scan, While TOP(1)/ORDER BY DESC Does Not

By Kendra Little on March 14, 2018

Most of the time in SQL Server, the MAX() function and a TOP(1) ORDER BY DESC will behave very similarly.

If you give them a rowstore index leading on the column in question, they’re generally smart enough to go to the correct end of the index, and – BOOP! – just pluck out the data you need without doing a big scan.

Continue reading

Forced Plan Confusion: Is_Forced vs Use Plan = True

Forced Plan Confusion: Is_Forced vs Use Plan = True

Identifying that a query plan has been bossed around in Query Store can be a bit tricky, because it can appear in different ways.

Continue reading

When Should I Use Explicit Transactions for Single Statements?

When Should I Use Explicit Transactions for Single Statements?

on February 22, 2018

Category: tsql , sql-server

I got a great question about transactions by email recently about transactions.

Continue reading

New SQLChallenge: Defuse the Deadlock

New SQLChallenge: Defuse the Deadlock

When I first created SQLWorkbooks, I distilled what it was all about down into one sentence: “Learn SQL Server by Solving Problems.”

This month, I introduce my first SQLChallenge, which distills that down into practice. The SQLChallenge features 23 minutes of video with scripts that you can use to reproduce and solve the problem yourself.

Continue reading