SlideShare a Scribd company logo
What Are Your Servers Doing While
You’re Sleeping?
Tracy McKibben
Principal Data Architect
Pearson VUE
Blog: realsqlguy.com
Twitter: @RealSQLGuy
I’m not saying I’m Batman, I’m just saying that nobody has
ever seen me and Batman in the same room together...
Good Morning, DBA!
Why Is SQL Server Slow Right Now?
• sp_who2 – shows current connections and running
processes
• DMVs – active processes, cached query plans, wait
stats
• Management Studio standard reports – based on
current DMVs
• Profiler – shows SQL activity in real-time
• Perfmon – shows server load/stats in real-time
Why Was SQL Server Slow At 3:00am?
• sp_who2 – only shows current activity
• DMVs – may or may not include past activity, difficult
to look at a specific point in time
• Management Studio standard reports – no time-
specific “history” reports
• Profiler – only shows current activity, unless running
continuously
• Perfmon – only shows current activity, unless running
continuously
Collect and Save Wait Stats
• Save at recurring intervals
• Save deltas between each interval (reset wait stats
each time, or compute delta vs previous save)
• Persist saved data in permanent tables
• Purge old data (determine an appropriate time for
your needs)
• Use my scripts http://realsqlguy.com/tools/collectors
Collect and Save Active Processes
• Save at recurring intervals
• Use sp_whoisactive to save process info, including
query plan and query text
• Persist saved data in permanent tables
• Purge old data (determine an appropriate time for
your needs)
• Use my scripts http://realsqlguy.com/tools/collectors
Collectors In Action
• Identify long-running queries
• Identify TEMPDB abusers
• Identify blocking problems
• Identify missing indexes
• Identify poorly written applications
• What else can we see?
Identify Long-Running Queries
• Long-running queries are often the first sign
of a problem.
• What does “long-running” mean in your
environment?
• A long-running query can indicate blocking, a
missing index, I/O problems, network
problems, application problems, and more.
• Inspect the query plan, the waits collected,
blocking sessions, TEMPDB utilization, CPU,
reads, writes, etc.
Identify TEMPDB Abusers
• Multi-step “procedural” operations that
explicitly create temp tables or table
variables
• Poorly written queries that perform large
grouping, sort, or aggregate operations
• Large hash operations
• Look for tuning opportunities, missing
indexes
Identify Blocking Problems
• Blocking is one process holding a lock that
prevents another process from running
• Poorly written queries can lead to extensive
or excessive locking, preventing other
queries from running, affecting overall
performance
• Severe blocking can affect system stability
• Look for tuning opportunities, missing
indexes
Identify Missing Indexes
Missing or insufficient indexes can lead to a
variety of performance problems:
• Table or index scans (not always a bad thing)
• Expensive key/row/bookmark lookups
• Extended or extensive locking
Identify Poorly Written Applications
• Excessive ASYNC_NETWORK_IO waits often
point to poorly written applications
• Row-by-row processing or excessively large
resultsets
• Common with development frameworks like
nHibernate
• Consume data as sets, not row-by-row, keep
resultsets as small as possible.
Summary
• Wait stats tell you where SQL Server is
hurting
• Active processes tell you what is contributing
to the hurt
• Determine the appropriate collection
intervals for your system(s)
• Analyze the collected data to proactively look
for problems.
The End
Any questions?

More Related Content

What's hot

Devoxx2017
Devoxx2017Devoxx2017
Devoxx2017
Bhakti Mehta
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systems
PriyangaKR1
 
Scaling Confluence Architecture: A Sneak Peek Under the Hood
Scaling Confluence Architecture: A Sneak Peek Under the HoodScaling Confluence Architecture: A Sneak Peek Under the Hood
Scaling Confluence Architecture: A Sneak Peek Under the Hood
Bhakti Mehta
 
Building High Performance MySql Query Systems And Analytic Applications
Building High Performance MySql Query Systems And Analytic ApplicationsBuilding High Performance MySql Query Systems And Analytic Applications
Building High Performance MySql Query Systems And Analytic Applications
guest40cda0b
 
Sync or swim: the challenge of complex offline apps
Sync or swim:  the challenge of complex offline appsSync or swim:  the challenge of complex offline apps
Sync or swim: the challenge of complex offline apps
OutSystems
 
Entity framework advanced
Entity framework advancedEntity framework advanced
Entity framework advanced
Usama Nada
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
NetStronghold
 
Free training on NCM - Discovery & Disaster recovery
Free training on NCM - Discovery & Disaster recovery Free training on NCM - Discovery & Disaster recovery
Free training on NCM - Discovery & Disaster recovery
ManageEngine, Zoho Corporation
 
Training - What is Performance ?
Training  - What is Performance ?Training  - What is Performance ?
Training - What is Performance ?
Betclic Everest Group Tech Team
 
Fast end-to-end-tests
Fast end-to-end-testsFast end-to-end-tests
Fast end-to-end-tests
Rikke Veng Petersen
 
Sistemas Distribuidos
Sistemas DistribuidosSistemas Distribuidos
Sistemas Distribuidos
Locaweb
 
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Ontico
 
OSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithOSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles Judith
NETWAYS
 
Training – Going Async
Training – Going AsyncTraining – Going Async
Training – Going Async
Betclic Everest Group Tech Team
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
Red Gate Software
 
The FeatureReader / FeatureWriter Revolution
The FeatureReader / FeatureWriter RevolutionThe FeatureReader / FeatureWriter Revolution
The FeatureReader / FeatureWriter Revolution
Safe Software
 
Performance testing
Performance testingPerformance testing
Performance testing
Nalini Kanth
 
Processes in Operating System
Processes in Operating SystemProcesses in Operating System
Processes in Operating System
Arafat Hossan
 
PhlexEview 4, The Smart eTMF Solution
PhlexEview 4, The Smart eTMF SolutionPhlexEview 4, The Smart eTMF Solution
PhlexEview 4, The Smart eTMF Solution
Gillian Gittens
 
Geek Sync | Extended Events: What Are They and How Do I Use Them?
Geek Sync | Extended Events: What Are They and How Do I Use Them?Geek Sync | Extended Events: What Are They and How Do I Use Them?
Geek Sync | Extended Events: What Are They and How Do I Use Them?
IDERA Software
 

What's hot (20)

Devoxx2017
Devoxx2017Devoxx2017
Devoxx2017
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systems
 
Scaling Confluence Architecture: A Sneak Peek Under the Hood
Scaling Confluence Architecture: A Sneak Peek Under the HoodScaling Confluence Architecture: A Sneak Peek Under the Hood
Scaling Confluence Architecture: A Sneak Peek Under the Hood
 
Building High Performance MySql Query Systems And Analytic Applications
Building High Performance MySql Query Systems And Analytic ApplicationsBuilding High Performance MySql Query Systems And Analytic Applications
Building High Performance MySql Query Systems And Analytic Applications
 
Sync or swim: the challenge of complex offline apps
Sync or swim:  the challenge of complex offline appsSync or swim:  the challenge of complex offline apps
Sync or swim: the challenge of complex offline apps
 
Entity framework advanced
Entity framework advancedEntity framework advanced
Entity framework advanced
 
Salesforce Apex Ten Commandments
Salesforce Apex Ten CommandmentsSalesforce Apex Ten Commandments
Salesforce Apex Ten Commandments
 
Free training on NCM - Discovery & Disaster recovery
Free training on NCM - Discovery & Disaster recovery Free training on NCM - Discovery & Disaster recovery
Free training on NCM - Discovery & Disaster recovery
 
Training - What is Performance ?
Training  - What is Performance ?Training  - What is Performance ?
Training - What is Performance ?
 
Fast end-to-end-tests
Fast end-to-end-testsFast end-to-end-tests
Fast end-to-end-tests
 
Sistemas Distribuidos
Sistemas DistribuidosSistemas Distribuidos
Sistemas Distribuidos
 
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
 
OSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles JudithOSMC 2019 | How to improve database Observability by Charles Judith
OSMC 2019 | How to improve database Observability by Charles Judith
 
Training – Going Async
Training – Going AsyncTraining – Going Async
Training – Going Async
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
 
The FeatureReader / FeatureWriter Revolution
The FeatureReader / FeatureWriter RevolutionThe FeatureReader / FeatureWriter Revolution
The FeatureReader / FeatureWriter Revolution
 
Performance testing
Performance testingPerformance testing
Performance testing
 
Processes in Operating System
Processes in Operating SystemProcesses in Operating System
Processes in Operating System
 
PhlexEview 4, The Smart eTMF Solution
PhlexEview 4, The Smart eTMF SolutionPhlexEview 4, The Smart eTMF Solution
PhlexEview 4, The Smart eTMF Solution
 
Geek Sync | Extended Events: What Are They and How Do I Use Them?
Geek Sync | Extended Events: What Are They and How Do I Use Them?Geek Sync | Extended Events: What Are They and How Do I Use Them?
Geek Sync | Extended Events: What Are They and How Do I Use Them?
 

Viewers also liked

Warren buffet
Warren buffetWarren buffet
Warren buffet
Chandan Dubey
 
แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่
แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่
แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่
Kamthon Sarawan
 
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and InformLife Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
EMC
 
EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...
EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...
EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...
EMC
 
Online Orientation 2015 Summer
Online Orientation 2015 SummerOnline Orientation 2015 Summer
Online Orientation 2015 Summer
Dan Etz
 
White paper holistic_approach_to_government_continuity_of_operations_apr2014
White paper holistic_approach_to_government_continuity_of_operations_apr2014White paper holistic_approach_to_government_continuity_of_operations_apr2014
White paper holistic_approach_to_government_continuity_of_operations_apr2014EMC
 
Forrester: How Organizations Are Improving Business Resiliency with Continuou...
Forrester: How Organizations Are Improving Business Resiliency with Continuou...Forrester: How Organizations Are Improving Business Resiliency with Continuou...
Forrester: How Organizations Are Improving Business Resiliency with Continuou...
EMC
 
KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...
KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...
KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...
Dr. Raju M. Mathew
 
Palestra para Academia - Vida e Saúde
Palestra para Academia - Vida e SaúdePalestra para Academia - Vida e Saúde
Palestra para Academia - Vida e Saúde
João Carlos
 
Fotonovel·la tutorial adrià, roger i gerard
Fotonovel·la tutorial adrià, roger i gerardFotonovel·la tutorial adrià, roger i gerard
Fotonovel·la tutorial adrià, roger i gerardmgonellgomez
 
AP stock market investing
AP stock market investingAP stock market investing
AP stock market investingTravis Klein
 
El cas del... oriol, oriol i nil
El cas del... oriol, oriol i nilEl cas del... oriol, oriol i nil
El cas del... oriol, oriol i nilmgonellgomez
 
IDC: Selecting the Optimal Path to Private Cloud
IDC: Selecting the Optimal Path to Private CloudIDC: Selecting the Optimal Path to Private Cloud
IDC: Selecting the Optimal Path to Private Cloud
EMC
 
発券機のNFC対応
発券機のNFC対応発券機のNFC対応
発券機のNFC対応Hirokuma Ueno
 
La telefonia mòbil guillem
La telefonia mòbil guillemLa telefonia mòbil guillem
La telefonia mòbil guillemmgonellgomez
 
City bogota
City bogotaCity bogota
City bogota
nancymar05
 

Viewers also liked (20)

Warren buffet
Warren buffetWarren buffet
Warren buffet
 
Dilgee hich
Dilgee hichDilgee hich
Dilgee hich
 
แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่
แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่
แบบบ้านสองชั้น สวยทันสมัย ตกแต่งน่าอยู่
 
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and InformLife Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
 
EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...
EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...
EMC Enterprise Hybrid Cloud 2.5.1, Federation SDDC Edition: Backup Solution G...
 
Online Orientation 2015 Summer
Online Orientation 2015 SummerOnline Orientation 2015 Summer
Online Orientation 2015 Summer
 
White paper holistic_approach_to_government_continuity_of_operations_apr2014
White paper holistic_approach_to_government_continuity_of_operations_apr2014White paper holistic_approach_to_government_continuity_of_operations_apr2014
White paper holistic_approach_to_government_continuity_of_operations_apr2014
 
Forrester: How Organizations Are Improving Business Resiliency with Continuou...
Forrester: How Organizations Are Improving Business Resiliency with Continuou...Forrester: How Organizations Are Improving Business Resiliency with Continuou...
Forrester: How Organizations Are Improving Business Resiliency with Continuou...
 
KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...
KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...
KNOWMATICS AND THE RELATED FIELDS OF STUDY- EDUCATION, PSYCHOLOGY, BRAIN RESE...
 
Palestra para Academia - Vida e Saúde
Palestra para Academia - Vida e SaúdePalestra para Academia - Vida e Saúde
Palestra para Academia - Vida e Saúde
 
Fotonovel·la tutorial adrià, roger i gerard
Fotonovel·la tutorial adrià, roger i gerardFotonovel·la tutorial adrià, roger i gerard
Fotonovel·la tutorial adrià, roger i gerard
 
AP stock market investing
AP stock market investingAP stock market investing
AP stock market investing
 
Oligopolios en México
Oligopolios en MéxicoOligopolios en México
Oligopolios en México
 
El cas del... oriol, oriol i nil
El cas del... oriol, oriol i nilEl cas del... oriol, oriol i nil
El cas del... oriol, oriol i nil
 
Tue law of demand
Tue law of demandTue law of demand
Tue law of demand
 
Audi rs6
Audi rs6Audi rs6
Audi rs6
 
IDC: Selecting the Optimal Path to Private Cloud
IDC: Selecting the Optimal Path to Private CloudIDC: Selecting the Optimal Path to Private Cloud
IDC: Selecting the Optimal Path to Private Cloud
 
発券機のNFC対応
発券機のNFC対応発券機のNFC対応
発券機のNFC対応
 
La telefonia mòbil guillem
La telefonia mòbil guillemLa telefonia mòbil guillem
La telefonia mòbil guillem
 
City bogota
City bogotaCity bogota
City bogota
 

Similar to What Are Your Servers Doing While You’re Sleeping?

SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
Dean Richards
 
introduction v4
introduction v4introduction v4
introduction v4
transformtoit
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1sqlserver.co.il
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 
The Importance of Wait Statistics in SQL Server
The Importance of Wait Statistics in SQL ServerThe Importance of Wait Statistics in SQL Server
The Importance of Wait Statistics in SQL Server
Grant Fritchey
 
High Performance Mysql
High Performance MysqlHigh Performance Mysql
High Performance Mysql
liufabin 66688
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
Kevin Kline
 
Got Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckGot Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckLuis Guirigay
 
Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...
Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...
Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...
eCapital Advisors
 
Visibility-from web application interface to the database
Visibility-from web application interface to the databaseVisibility-from web application interface to the database
Visibility-from web application interface to the database
ManageEngine, Zoho Corporation
 
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail UnleashedRoman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
MSDEVMTL
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Abishek V S
 
Free oracle performance tools
Free oracle performance toolsFree oracle performance tools
Free oracle performance tools
Rogerio Bacchi Eguchi
 
A data driven etl test framework sqlsat madison
A data driven etl test framework sqlsat madisonA data driven etl test framework sqlsat madison
A data driven etl test framework sqlsat madisonTerry Bunio
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
Alfredo Krieg
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12c
xKinAnx
 
Data Pipelines with Python - NWA TechFest 2017
Data Pipelines with Python - NWA TechFest 2017Data Pipelines with Python - NWA TechFest 2017
Data Pipelines with Python - NWA TechFest 2017
Casey Kinsey
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting forJason Strate
 

Similar to What Are Your Servers Doing While You’re Sleeping? (20)

Tool
ToolTool
Tool
 
Introduction
IntroductionIntroduction
Introduction
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
 
introduction v4
introduction v4introduction v4
introduction v4
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 
The Importance of Wait Statistics in SQL Server
The Importance of Wait Statistics in SQL ServerThe Importance of Wait Statistics in SQL Server
The Importance of Wait Statistics in SQL Server
 
High Performance Mysql
High Performance MysqlHigh Performance Mysql
High Performance Mysql
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
 
Got Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckGot Problems? Let's Do a Health Check
Got Problems? Let's Do a Health Check
 
Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...
Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...
Managing Your Hyperion Environment – Performance Tuning, Problem Solving and ...
 
Visibility-from web application interface to the database
Visibility-from web application interface to the databaseVisibility-from web application interface to the database
Visibility-from web application interface to the database
 
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail UnleashedRoman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Free oracle performance tools
Free oracle performance toolsFree oracle performance tools
Free oracle performance tools
 
A data driven etl test framework sqlsat madison
A data driven etl test framework sqlsat madisonA data driven etl test framework sqlsat madison
A data driven etl test framework sqlsat madison
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12c
 
Data Pipelines with Python - NWA TechFest 2017
Data Pipelines with Python - NWA TechFest 2017Data Pipelines with Python - NWA TechFest 2017
Data Pipelines with Python - NWA TechFest 2017
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting for
 

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

What Are Your Servers Doing While You’re Sleeping?

  • 1. What Are Your Servers Doing While You’re Sleeping?
  • 2. Tracy McKibben Principal Data Architect Pearson VUE Blog: realsqlguy.com Twitter: @RealSQLGuy I’m not saying I’m Batman, I’m just saying that nobody has ever seen me and Batman in the same room together...
  • 4. Why Is SQL Server Slow Right Now? • sp_who2 – shows current connections and running processes • DMVs – active processes, cached query plans, wait stats • Management Studio standard reports – based on current DMVs • Profiler – shows SQL activity in real-time • Perfmon – shows server load/stats in real-time
  • 5. Why Was SQL Server Slow At 3:00am? • sp_who2 – only shows current activity • DMVs – may or may not include past activity, difficult to look at a specific point in time • Management Studio standard reports – no time- specific “history” reports • Profiler – only shows current activity, unless running continuously • Perfmon – only shows current activity, unless running continuously
  • 6. Collect and Save Wait Stats • Save at recurring intervals • Save deltas between each interval (reset wait stats each time, or compute delta vs previous save) • Persist saved data in permanent tables • Purge old data (determine an appropriate time for your needs) • Use my scripts http://realsqlguy.com/tools/collectors
  • 7. Collect and Save Active Processes • Save at recurring intervals • Use sp_whoisactive to save process info, including query plan and query text • Persist saved data in permanent tables • Purge old data (determine an appropriate time for your needs) • Use my scripts http://realsqlguy.com/tools/collectors
  • 8. Collectors In Action • Identify long-running queries • Identify TEMPDB abusers • Identify blocking problems • Identify missing indexes • Identify poorly written applications • What else can we see?
  • 9. Identify Long-Running Queries • Long-running queries are often the first sign of a problem. • What does “long-running” mean in your environment? • A long-running query can indicate blocking, a missing index, I/O problems, network problems, application problems, and more. • Inspect the query plan, the waits collected, blocking sessions, TEMPDB utilization, CPU, reads, writes, etc.
  • 10. Identify TEMPDB Abusers • Multi-step “procedural” operations that explicitly create temp tables or table variables • Poorly written queries that perform large grouping, sort, or aggregate operations • Large hash operations • Look for tuning opportunities, missing indexes
  • 11. Identify Blocking Problems • Blocking is one process holding a lock that prevents another process from running • Poorly written queries can lead to extensive or excessive locking, preventing other queries from running, affecting overall performance • Severe blocking can affect system stability • Look for tuning opportunities, missing indexes
  • 12. Identify Missing Indexes Missing or insufficient indexes can lead to a variety of performance problems: • Table or index scans (not always a bad thing) • Expensive key/row/bookmark lookups • Extended or extensive locking
  • 13. Identify Poorly Written Applications • Excessive ASYNC_NETWORK_IO waits often point to poorly written applications • Row-by-row processing or excessively large resultsets • Common with development frameworks like nHibernate • Consume data as sets, not row-by-row, keep resultsets as small as possible.
  • 14. Summary • Wait stats tell you where SQL Server is hurting • Active processes tell you what is contributing to the hurt • Determine the appropriate collection intervals for your system(s) • Analyze the collected data to proactively look for problems.