Search Results for “parameter sniffing”

Stats Week: Statistics Terminology Cheatsheet

SQL Server
7 Comments
These things used to confuse me so much Despite having worked at a Market Research company for a while, I know nothing about statistics, other than that project managers have all sorts of disagreeably subjective phrases for describing them. Vast majority, convincing plurality, dwindling minority, et al. Less talky, more picture. When I started getting…
Read More

Database-Scoped Configurations Replace Trace Flags.

SQL Server
23 Comments
Trace flags are special switches that, when you flip them, enable different behaviors in your SQL Server. Back in the SQL Server 2000-2005 days, these were super-rare undocumented tricks that were handed out by Microsoft support to fix rare cases. Over time, some trace flags have become so commonplace that they worked their way into…
Read More

Developers: Who Needs a DBA? [Video]

SQL Server
8 Comments
You store data in SQL Server, but you don’t have enough work to keep a full-time DBA busy. In just half an hour, you’ll learn the basics of performance troubleshooting and index tuning from me – a recovering developer myself. I’ll show you the basic care and feeding of a Microsoft SQL Server instance and give…
Read More
Plan Guides are like duct tape

Stabilizing Execution Plans: Plan Guides and NORECOMPUTE

What could go wrong? Sometimes you end up in a good plan / bad plan situation: an important query runs just fine most of the time. The query is parameterized, a good execution plan gets re-used, everything is cool. But sometimes, a “bad plan” gets compiled and starts to be reused. This is “bad” parameter sniffing. “Bad plans” can…
Read More

Frequently Asked Questions About TempDB

SQL Server, TempDB
42 Comments
The questions came fast and furious in one of my recent TempDB webcasts, so here’s the ones I wasn’t able to answer during the live session: Q: Virtualized OS, SAN, no dedicated LUNs, most likely scenario with no gotchas, theoretically: dump TempDB with everything else all on one virtual volume, including logs — or split…
Read More

Optimize for… Mediocre?

Some query hints sound too good to be true. And, unfortunately, usually they aren’t quite as magical as they might seem. Frustration with unpredictable execution times People often learn about parameter sniffing when query execution times stop being predictable. Occasionally you’ll hear about a stored procedure taking much longer than normal, but the next time…
Read More

How Does SQL Server Store Data?

SQL Server
60 Comments
Let’s step back and take a look at the big picture.  (Today, I’m writing for beginners, so you advanced gurus can go ahead and close the browser now.  I’m going to simplify things and leave a lot out in order to get some main points across.  Don’t well-actually me.) Microsoft SQL Server databases are stored…
Read More
Pocket Square

Trace Flags Enabled Globally

sp_Blitz Result: Trace Flags Enabled Globally SQL Server has configuration knobs called trace flags that you can turn off and on – either at the session level for experimentation, or at the server level.  Trace flags are typically used for diagnostic purposes and they may need to be disabled once the issue is corrected. This…
Read More
Pocket Square

Missing Index

Blitz Result: Missing Index Found in the Plan Cache SQL Server can use indexes to make queries run much faster, and while it’s executing queries, it tracks which indexes it wishes would have been around.  We can query the DMVs to discover what indexes SQL Server recommends, and we can also check the plan cache…
Read More
Pocket Square

SQL Server Training Classes by Brent Ozar

One-Day Fundamentals You need to make SQL Server fast and reliable. I do this stuff in real life every week, and I can teach you how to make it happen. Start with the top left box (How I Use the First Responder Kit) and then only take classes that border classes you’ve already taken. For…
Read More

Simon Sabin’s talk on query performance

Execution Plans
1 Comment
At #SQLbits, Simon Sabin (Twitter) talked about car crash queries: queries that suddenly have bad performance out of nowhere, yet if you copy/paste them into SQL Server Management Studio, they run quickly.  The culprit is often parameter sniffing: the engine looks at the query and builds a plan, but if the parameters in the WHERE…
Read More
Pocket Square

Scaling SQL Server

Scale Up or Scale Out? Scaling SQL Server I would like to scale up my coffee cup. Want your app to be able to handle more users? Here are tips, tricks, and links to comprehensive references on how to scale SQL Server– either Scale Up or Scale Out. Do You Really Have a Scale Problem? It…
Read More