Black Friday prices end in 28d 13h 44m — See the sale

Performance Monitoring and Server Tuning

Diagnosing instance performance through waits, resources, monitoring, and baselines.

405 associated posts180 primary posts

T-SQL & Development

[Video] The Top 10 Developer Mistakes That Won’t Scale on Microsoft SQL Server

You're a C# or Java developer building an application that stores data in Microsoft SQL Server, and you want to avoid common pitfalls that will cause you scalability problems down the road.

In this session from my live stream, you'll learn why you probably want to avoid triggers, SELECT *, user-defined functions, dynamic SQL, big datatypes, heaps, storing binaries in the database, old indexes, TempDB, and SQL Server's v1 features:

Read more about [Video] The Top 10 Developer Mistakes That Won’t Scale on Microsoft SQL Server 3 comments — Join the discussion

Page Life Expectancy Doesn’t Mean Jack, and You Should Stop Looking At It.

Page Life Expectancy is a Perfmon counter that's supposed to track how long pages stay in memory before they get flushed out to make room for other pages that are needed instead.

Paul Randal has blogged this a few times, and rather than rehash 'em, I'd rather point you to a couple of his roundups:

Read more about Page Life Expectancy Doesn’t Mean Jack, and You Should Stop Looking At It. 28 comments — Join the discussion
Performance Tuning

Parallelism Can Make Queries Perform Worse.

While I was building lab queries for my all-new Fundamentals of Parameter Sniffing course - first live one is next week, still time to get in - I ran across a query with delightfully terrible behavior.

I'm always torn when I build the hands-on labs. I want to make the challenges easy enough that you can accomplish 'em in the span of an hour, but hard enough that they'll ... well, challenge you.

Read more about Parallelism Can Make Queries Perform Worse. 3 comments — Join the discussion
Production DBA

[Video] How Can I Measure If My Database Does More Reads Than Writes?

When someone asks you, "Is this database read-intensive or write-intensive?" you probably look at sys.dm_io_virtual_file_stats to measure the file activity - but that isn't really correct. After all, your users run a lot of queries all day that are simply satisfied from the buffer pool. SQL Server caches your data so it doesn't have to hit the disks, but ... those are reads, right? (Write? Get it?)

Read more about [Video] How Can I Measure If My Database Does More Reads Than Writes? 17 comments — Join the discussion

Why Database Monitoring Tools Are So Hard to Interpret

SentryOne's Greg Gonzalez recently published a post about "Why Wait Stats Alone Are Not Enough." Sure, Greg's obviously biased towards his own monitoring tool, but his post is really well-written and fair. I want to explain the same story, but from a different (and simplified) angle.

Say we've got a really simple database server, and we start out with just one query that runs each day:

Read more about Why Database Monitoring Tools Are So Hard to Interpret 2 comments — Join the discussion

Three Reasons to (Temporarily) Change Max Worker Threads

When you go to the deli, there's a "take a number" dispenser where you tear off a number and wait for your number to be called.

If you walked into a deli and you saw 50 people lined up all waiting their turn, and you went to take a number and the dispenser was completely empty, you'd say to yourself, "I think I'll come back later."

Read more about Three Reasons to (Temporarily) Change Max Worker Threads 10 comments — Join the discussion
Performance Tuning

DBA Training Plan 15: What’s Your SQL Server Waiting On?

You're here, dear reader, because you weren't "classically trained" as a database administrator. You didn't graduate from the University of Sciencing Computerses with a Master's of Transactional Processing.

You probably got your start as a developer or sysadmin, and gradually fumbled your way here. You're used to monitoring stuff from the OUTSIDE using things like perfmon counters or CPU graphs.

Read more about DBA Training Plan 15: What’s Your SQL Server Waiting On? 6 comments — Join the discussion

Are your CPU-intensive queries running slowly? Check your VM type.

When you build a VM for SQL Server in Amazon EC2, Azure VMs, or Google Compute Engine, it's all too easy to overlook the CPU speeds that you're getting. Most of the time, it doesn't really matter because SQL Server isn't usually CPU-bottlenecked: your queries are doing table scans with 16GB RAM, starving for IO throughput.

Read more about Are your CPU-intensive queries running slowly? Check your VM type. 15 comments — Join the discussion
Performance Tuning

15 Reasons Your Query Was Fast Yesterday, But Slow Today

In rough order of how frequently I see 'em: There are different workloads running on the server (like a backup is running right now.) You have a different query plan due to parameter sniffing. The query changed, like someone did a deployment or added a field to the select list. You have a different query…

Read more about 15 Reasons Your Query Was Fast Yesterday, But Slow Today 20 comments — Join the discussion