SQLPASS Day 2- Optimization Timeouts and All about TLogs
SQLPass unfortunately can’t last forever, but happily it’s still going strong. Here’s some highlights from my Day #2. Paul Randal Knows Exactly What’s Going on in Your Transaction Log… A definite...
View ArticleSQL PASS Day 1: To Free or Not To Free the Proc Cache?
Yesterday was day 1 of SQL PASS 2009. I am attending a variety of sessions on execution plans this year, and along the way I heard three very different opinions yesterday on managing the procedure...
View ArticleWho’s Using All that Space in tempdb, and What’s their Plan?
Whatcha Doing in My TempDb??? This post contains a script that I adapted from the fantastic SQL Server Storage Engine Blog. It comes in handy in my job all the time! Sometimes tempdb is filling up,...
View ArticleAverage Daily Job Runtime
Here’s a query I found useful today– this week we moved many of our production datamart servers to SQL 2K5 SP3 CU4, and today among the course of other issues I wanted to take a look at my job...
View ArticleFinding Plans and Stats for Queries like '%something%'
I often need to find a query plan in the cache for a process that has run long overnight. Typically I’ll be able to figure out from our logging some of the tables involved in the query. Sometimes I...
View ArticleThe DBA Sees Your Blocking Spids… A Bird's Eye Summary of Blocking
Maybe you’re a user in a reporting database running a long query in the read committed isolation level, merrily blocking a process which needs to load data. Maybe you’re an application misbehaving in...
View ArticleIndex Usage Statistics with ColumnList and Index Size
As an add on to my last post, here is what I currently do use to track index usage. This shows usage, columns in the index, and index size on disk. The size can be quite useful to know when evaluating...
View ArticleHow Stale are my Statistics?
Update: improved/more recent version of queries for this are here. It can be pretty difficult to manage statistics in data warehouses, or even OLTP databases that have very large tables. This is...
View ArticleReview: A day of doing many things at once with @AdamMachanic
A day of doing many things At SQLPass this year I was fortunate to attend “A day of doing many things at once: Multitasking, Parallelism, and Process distribution” by Adam Machanic (blog | twitter)....
View ArticleHow Do I Analyze a SQL Server Execution Plan?
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”...
View ArticleSQLServer:Databases(_Total)\Transactions/sec vs SQL Statistics\Batch...
Perfmon counters are great for measuring workload, but choosing which counter to baseline can be confusing. The Transactions/sec counter has big blind spots Watch a quick 5 minute demo showing that...
View ArticleThe Case of the Blocking Merge Statement (LCK_M_RS_U locks)
Recently I got a fun question about an “upsert” pattern as a “Dear SQL DBA” question. The question is about TSQL, so it lent itself to being answered in a blog post where I can show repro code and...
View ArticleWhy Table Partitioning Doesn’t Speed Up Query Performance (video)
Learn why SQL Server’s table partitioning feature doesn’t make your queries faster– and may even make them slower. In this 20 minute video, I’ll show you my favorite articles, bugs, and whitepapers...
View ArticleManaging Statistics in SQL Server for DBAs (videos)
Want to learn more about managing statistics updates in SQL Server? Watch my free 27 minute presentation on managing statistics: You can also watch 12 minutes of audience Q&A on statistics from...
View ArticleUpdating Statistics in SQL Server: Maintenance Questions & Answers
I’ve been asked a lot of questions about updating statistics in SQL Server over the years. And I’ve asked a lot of questions myself! Here’s a rundown of all the practical questions that I tend to get...
View Article3 Tricks with STATISTICS IO and STATISTICS TIME in SQL Server
When you need to measure how long a query takes and how many resources it uses, STATISTICS TIME and STATISTICS IO are great tools for interactive testing in SQL Server. I use these settings...
View ArticleLive Query Statistics Don’t Replace Actual Execution Plans
I like SQL Server’s new Live Query Statistics feature a lot for testing and tuning large queries. One of my first questions was whether this could replace using actual execution plans, or if it’s...
View ArticleSQL Server’s YEAR() Function and Index Performance
SQL Server’s really clever about a lot of things. It’s not super clever about YEAR() when it comes to indexes, even using SQL Server 2016 — but you can either make your TSQL more clever, or work...
View ArticleDoes Query Store’s “Regression” Always Catch Nasty Parameter Sniffing?
SQL Server 2016’s new Query Store feature has an option that looks for “regressed” query plans. Plan choice regression is explained in Books Online this way: During the regular query execution Query...
View ArticleHow to Find Missing Index Requests in Query Store
SQL Server 2016’s new Query Store feature makes it easier than ever for DBAs and developers to identify the most important queries to tune– and perhaps apply a quick fix by pinning an execution plan....
View Article