3 Things I Wish I’d Learned Earlier as a SQL Server DBA
Back in my day, we used a courier for log shipping. Hindsight is everything. I was lucky to be trained by a great team of DBAs back when I first started with SQL Server. But it’s hard to know exactly...
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 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 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 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 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 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 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 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 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 ArticleTarget Recovery Interval and Indirect Checkpoint – New Default of 60 Seconds...
SQL Server 2016 introduces big new features, but it also includes small improvements as well. Many of these features are described in the “It Just Runs Faster” series of blog posts by Bob Ward and Bob...
View ArticleOutside the Big SAN Box: Identifying Storage and SAN Latency in SQL Server...
Note: This is a “listen-able” 36 minute video. You can also listen to this as a podcast – learn how at littlekendra.com/dearsqldba. Here’s today’s question: Dear SQL DBA, What do you say to a SAN...
View ArticleIndex Usage Stats Insanity – sys.dm_db_index_usage_stats (Dear SQL DBA)
SQL Server’s “index usage stats” dynamic management view is incredibly useful– but does it tell you what you THINK it tells you? Kendra explains the quirks of how sys.dm_db_index_usage_stats works, as...
View ArticleMax Degree of Confusion (Dear SQL DBA Episode 8)
Learn how to configure the Max Degree of Parallelism and Cost Threshold for Parallelism settings in SQL Server – and how SQL Server 2014 SP2 and SQL Server 2016 change the way that SQL Server...
View ArticleRead from the Right End of the Index: BACKWARD Scans
Optimizing queries is the most fun when you don’t need to add indexes. There’s nothing quite so nice as finding a way to make reading data faster, without slowing down writes or creating new data...
View ArticleDirty Pages and Statistics IO
Warning: The DROPCLEANBUFFERS command referenced in this post is appropriate for test systems only and impacts the entire SQL Instance. If you are new to SQL Server, please use this commands with...
View ArticleThe Magic of the Self-Assigned Lab (SQLSkills Immersion Training Days 2 and 3)
The duck has obtained scuba gear-- it can go to new depths on its own. Today, more blog from SQLSkills Immersion Training on Internals and Performance in Dallas, TX. For more about the training, see...
View ArticleHow To: Automate Continuous SQLServer Activity with Stored Procedures and...
The Goal It’s often useful to be able to run a bunch of stored procedures in the background over a period of time against a test instance. This can be nice for: Demos and presentations. Populating...
View ArticleThere’s more than one way to skin an eggplant: Using APPLY for calculations
Choices, choices Here’s a little TSQL snack. I picked this up in a presentation by Itzik Ben-Gan at the PNWSQL user group recently, and it’s become a fast favorite. CROSS APPLY and OUTER APPLY-...
View ArticleDBCC USEROPTIONS: See Your Session Settings in SQL Server
This is a super old command, but it still comes in handy when working with SQL Server. Want to know your default isolation level in the current database? Run this. (If optimistic locking is turned on...
View Article