Download presentation
Presentation is loading. Please wait.
Published byEmmeline Walsh Modified over 8 years ago
2
This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information in this document, including URL and other Internet Web site references, is subject to change without notice. The entire risk of the use or the results from the use of this document remains with the user. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. © 2013 Microsoft Corporation. All rights reserved. Microsoft and other Microsoft products referenced herein are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners. Disclaimer
4
PSSDiag SQL Nexus
5
What does it collect? Server Configuration PerfStats Script Event Logs Performance Monitor Profiler Trace Error Logs
18
It’s all about the bottleneck
20
Look for high number of logical reads Could be heavy compiles Could be stale statistics Find the most expensive query
23
What can I do? Enable Optimize for Adhoc Workloads Parameterization: Forced
26
Look for scans, hashes, sorts or expensive operators in plan Look for high number of logical reads Could be heavy compiles Find the most expensive query Incorrect cardinality estimation a top issue Missing indexes or out of date stats May be a query design issue Parallel queries may take over the machine Common issues Tune indexes, stats, and/or query Limiting MAXDOP for parallel queries is temporary Apply a hotfix build Parameterize the query to reduce compiles Common Solutions What if I don’t have high CPU?
30
Is it waiting on another resource? Is it idle? Is it running? Find the lead blocker Transaction not committed or long running transaction Waiting on another resource Poor query plan Basic concurrency is “working” Common issues Tune index, stats, and/or query Application design (Ex. Fix commit tran problem) Consider READ_COMMITTED_SNAPSHOT db option Typical Solutions Deadlocks start as blocking. Almost always app problem. A large blocking chain can lead to a “hang” as seen in ERRORLOG What if I don’t have blocking?
31
Turtle
32
High Sec/T + High Bytes/Sec = SQL Flood High Sec/T + High Bytes/Sec = SQL Flood High Sec/T + Low Bytes/Sec = Disk Subsystem High Sec/T + Low Bytes/Sec = Disk Subsystem
33
This is starting to sound familiar…
34
Not enough cache for data Physical read counters Buffer Cache Hit Ratio is misleading Check ‘max server memory’ Memory throttles lead to blocking Compile memory Query memory (sorts and hash joins) Not enough cache for queries Engine has forced limits Too many ad-hoc queries Check compilations/sec
37
DMVs, sp_updatestats, UPDATE STATS, and “auto stats” Update Stats DMVs, SHOWPLAN, and DTA Create missing indexes Change T-SQL, Query Hints, Plan Guides Change query Tune index, stats, query Change application Often required for blocking/deadlocks Tune hardware CPU, Memory, I/O Don’t just jump to any of these!
41
Test 5GB No kitchen sink
42
Use Showplan All for queries that never complete
43
Only run a heavy trace for a few minutes
44
True or False?
45
PSSdiag /B 14:00:00 PSSdiag /E +02:00:00 PSSdiag /B 08:00:00 /E +09:00:00 PSSdiag /E 02:00:00 /L /Q All command line parameters: http://msdn.microsoft.com/en-us/library/ms162833.aspx
49
Is it SQL Server? Running (High CPU)? Find the most expensive query Missing indexes/stats or “stale” stats? Plan look “poor”? Cardinality Estimation Problems? Waiting? Locks (Blocking) I/O Network Other Latch Other Wait It’s all about the bottleneck SQL Server Wide Configuration rarely is the cause
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.