Presentation is loading. Please wait.

Presentation is loading. Please wait.

5 Common SQL Server Performance Issues Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net.

Similar presentations


Presentation on theme: "5 Common SQL Server Performance Issues Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net."— Presentation transcript:

1 5 Common SQL Server Performance Issues Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net

2 Agenda Tutorial Level 1 – The Easy Stuff Level 2 – A Little Tougher Level 3 – The Gloves Are Off Hidden Level Wrap-up

3 Who is Jason Hall? Director of Client SQL Sentry, Inc. Microsoft Platform Developer Since 1998 SQL Server Developer Since 6.5 Microsoft Certified Former US Army Paratrooper Horror Fan 3

4 Tutorial (aka) What is this? Each level covers 1 or 2 performance issues The end of each level is a boss fight (demo) After level 3 we have a short Q&A (preparation for war) The final boss battle! Note: I will be using some SQL Sentry tools for demos. This is purely for making things easier to demonstrate for me. This is not a commercial presentation, so if you have questions about the tools I’m using, please see me after the presentation, or send me an later. I spend a large portion of each day looking through performance reports and dashboards from various organizations around the world. As a result I've identified some very common performance problems and/or misunderstandings that tend to have easy, though not always obvious, solutions. I want to share the “whys and hows” of these with you today.

5 LEVEL 1: The Easy Stuff

6 Misunderstood “Timeout Expired…" Can be a connection timeout or an operation timeout; We’re talking about operation timeouts here Controlled by the client, not the server Not related to “Remote Query Timeout” in server connection properties Not even necessarily due to a long running or poor performing query

7 What to do Monitor general server performance and rule out server resource contention Use various methods to determine the specific query that is timing out, try to get the execution plan and tune it. Statistics Indexes Code

8 Misunderstood CXPACKET Waits Perfectly normal wait type associated with parallelism Usually a sign of another problem* Don’t just set MAXDOP to 1 #1 SQL Server wait type that I see when people are trying to troubleshoot a specific slow query or process

9 What to do Check statistics and update if needed Check for missing or unused indexes Cost Threshold for Parallelism Consider refactoring the query As a last resort consider looking at MAXDOP

10

11 Level 2: A little tougher

12 Memory Pressure #1 most common performance problem that I see Symptoms can mimic IO problems A good example of why you should not necessarily take action based on a single performance metric Consider NUMA architecture when monitoring Page Life Expectancy

13 What to do Cap Max Memory on SQL Server Add more memory Don’t forget about watching for uneven NUMA load

14 Auto Update Statistics What are the default rules? We have large tables and indexes, and they are just getting larger. In many cases, the default is not good enough Know how to recognize this issue, and target statistic updates on schedule Worst case, you can change the rules -

15

16 LEVEL 3: The gloves are off!

17 TempDB PAGELATCH Contention Becoming more common. I’m not sure if it’s more because of my awareness of it, or because it really is happening more Latch contention on allocation pages Heavy use of tempDB on a server where tempDB has a default configuration One of the better explanations is here by Robert Davis

18 What to do Configure tempDB following best practices Multiple even sized data files Fast dedicated storage Read this

19

20

21 HIDDEN LEVEL: There is no cow level!

22 Agent History Retention Strange issues with Agent and Agent Jobs can be tracked to this Tables aren’t indexed with consistent querying in mind Don’t set retention to unlimited Default is usually good enough

23 Wrap Up 1.I recently updated my blog with a similar post on the top Windows issues that I encounter that may effect SQL Server performance. 2.Check out 3.PLEASE stop by and thank the sponsors. Yes they are here trying to sell stuff, but they are also giving up their weekend to sponsor this event, and they don’t even get to attend sessions (sad face). 4.Make sure and thank the event organizers for their heroic efforts in putting this SQL Saturday together!


Download ppt "5 Common SQL Server Performance Issues Jason Hall-SQL Sentry, Dir of Client Services Blog-jasonhall.blogs.sqlsentry.net."

Similar presentations


Ads by Google