SlideShare uma empresa Scribd logo
1 de 9
©2011 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without
notice
SQL Server 2008 WAITS
Miroslav Dimitrov
How SQL Server works ?!
• SQL Server OS
– Schedulers
– Workers
Lists to which workers can be assigned:
worker
waiter
runnable
I/O
timer
WAITS – What are they ?!
• SQL Server 2000
– DBCC SQLPERF
– ”sysprocesses” system view (waittype column)
• SQL Server 2005 - DMVs
– sys.dm_os_wait_stats – wait statistics
– sys.dm_os_waiting_tasks – task-level wait information
• SQL Server 2008
– new waits
– Solve the problem with fine-grained analysis of wait statistics in SQL Server 2005
Types of WAITS
• Resource waits
• Queue waits
• External waits
A SQL Server worker thread is not considered to be waiting if any of the
following is true:
• A resource becomes available.
• A queue is nonempty.
• An external process finishes.
Waits
• Memory Waits
– CMEMTHREAD
– RESOURCE_SEMAPHORE
• Disk I/O Waits
– IO_COMPLETION
– ASYNC_IO_COMPLETION
– WRITELOG
– PAGEIOLATCH_*
• Blocking waits
– LCK_*
Waits (continued)
• CPU
– CXPACKET
– SOS_SCHEDULER_YIELD
• Network Waits
– ASYNC_NETWORK_IO
– DBMIRROR_SEND
• System waits
– LAZYWRITER_SLEEP
– REQUEST_FOR_DEADLOCK_SEARCH
– SQLTRACE_BUFFER_FLUSH
– XE_TIMER_EVENT
– FT_IFTS_SCHEDULER_IDLE_WAIT
– LOGMGR_QUEUE
– CHECKPOINT_QUEUE
– SLEEP_TASK
– BROKER_TO_FLUSH
Waits (continued)
• Preemptive Wait Types
• SQL Server extended events
Demo time
References
• http://msdn.microsoft.com/en-
us/library/ms179984%28v=SQL.90%29.aspx
• http://msdn.microsoft.com/en-
us/library/ms179984%28v=SQL.100%29.aspx
• http://msdn.microsoft.com/en-
us/library/ms179984%28v=SQL.105%29.aspx

Mais conteúdo relacionado

Mais procurados

What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
Geir Høydalsvik
 
Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5
Trieu Dao Minh
 

Mais procurados (20)

Oracle Database In-Memory Advisor (English)
Oracle Database In-Memory Advisor (English)Oracle Database In-Memory Advisor (English)
Oracle Database In-Memory Advisor (English)
 
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
 
Sql Server 2014 In Memory
Sql Server 2014 In MemorySql Server 2014 In Memory
Sql Server 2014 In Memory
 
Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
Elephants vs. Dolphins:  Comparing PostgreSQL and MySQL for use in the DoDElephants vs. Dolphins:  Comparing PostgreSQL and MySQL for use in the DoD
Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
 
MySQL configuration - The most important Variables
MySQL configuration - The most important VariablesMySQL configuration - The most important Variables
MySQL configuration - The most important Variables
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasia
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
MySQL Server Defaults
MySQL Server DefaultsMySQL Server Defaults
MySQL Server Defaults
 
The Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQLThe Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQL
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
 
Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5Postgres_9.0 vs MySQL_5.5
Postgres_9.0 vs MySQL_5.5
 
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloudKoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#9_London_FromPlanToBackupToCloud
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
 

Destaque

What have i learnt from audience feedback
What have i learnt from audience feedbackWhat have i learnt from audience feedback
What have i learnt from audience feedback
chocolatecake
 
Sejarah turun,penulisan&pemeliharaan
Sejarah turun,penulisan&pemeliharaanSejarah turun,penulisan&pemeliharaan
Sejarah turun,penulisan&pemeliharaan
Riyan Smart
 
Artihistoria laiagemmaanna
Artihistoria laiagemmaannaArtihistoria laiagemmaanna
Artihistoria laiagemmaanna
Gemma Palet
 
Southwest Ideas Investor Conference Presentation
Southwest Ideas Investor Conference PresentationSouthwest Ideas Investor Conference Presentation
Southwest Ideas Investor Conference Presentation
harleyebarnes
 

Destaque (20)

What have i learnt from audience feedback
What have i learnt from audience feedbackWhat have i learnt from audience feedback
What have i learnt from audience feedback
 
AMXi Overview
AMXi OverviewAMXi Overview
AMXi Overview
 
Paella
PaellaPaella
Paella
 
Scott Edmunds talking Bauhina Genome at DIYBIOHK
Scott Edmunds talking Bauhina Genome at DIYBIOHKScott Edmunds talking Bauhina Genome at DIYBIOHK
Scott Edmunds talking Bauhina Genome at DIYBIOHK
 
Sejarah turun,penulisan&pemeliharaan
Sejarah turun,penulisan&pemeliharaanSejarah turun,penulisan&pemeliharaan
Sejarah turun,penulisan&pemeliharaan
 
5th Estate in China-2012
5th Estate in China-20125th Estate in China-2012
5th Estate in China-2012
 
inventos
inventosinventos
inventos
 
Maximizing Domain Name PPC Income - With Howard Hoffman
Maximizing Domain Name PPC Income - With Howard HoffmanMaximizing Domain Name PPC Income - With Howard Hoffman
Maximizing Domain Name PPC Income - With Howard Hoffman
 
Shane Wells: How I Went from $50,000 to More Than $250,000 in Sales Per Year
Shane Wells: How I Went from $50,000 to More Than $250,000 in Sales Per YearShane Wells: How I Went from $50,000 to More Than $250,000 in Sales Per Year
Shane Wells: How I Went from $50,000 to More Than $250,000 in Sales Per Year
 
CV: Ahmad Mohamed Yahya
CV: Ahmad Mohamed YahyaCV: Ahmad Mohamed Yahya
CV: Ahmad Mohamed Yahya
 
Cap2
Cap2Cap2
Cap2
 
Cultural Competency Research -- Jenn Chin's presentation
Cultural Competency Research -- Jenn Chin's presentationCultural Competency Research -- Jenn Chin's presentation
Cultural Competency Research -- Jenn Chin's presentation
 
Ginger Cookies
Ginger CookiesGinger Cookies
Ginger Cookies
 
5th estate presentation to CRASSH, Cambridge
5th estate presentation to CRASSH, Cambridge5th estate presentation to CRASSH, Cambridge
5th estate presentation to CRASSH, Cambridge
 
Artihistoria laiagemmaanna
Artihistoria laiagemmaannaArtihistoria laiagemmaanna
Artihistoria laiagemmaanna
 
Banana Split
Banana SplitBanana Split
Banana Split
 
Do you feel secure online? Beliefs and Attitudes on Security and Privacy
Do you feel secure online? Beliefs and Attitudes on Security and PrivacyDo you feel secure online? Beliefs and Attitudes on Security and Privacy
Do you feel secure online? Beliefs and Attitudes on Security and Privacy
 
China and Trust in the New Internet World
China and Trust in the New Internet WorldChina and Trust in the New Internet World
China and Trust in the New Internet World
 
Digital Academe: Implications of Digital Research
Digital Academe: Implications of Digital ResearchDigital Academe: Implications of Digital Research
Digital Academe: Implications of Digital Research
 
Southwest Ideas Investor Conference Presentation
Southwest Ideas Investor Conference PresentationSouthwest Ideas Investor Conference Presentation
Southwest Ideas Investor Conference Presentation
 

Semelhante a Sql waits

Migration to Redshift from SQL Server
Migration to Redshift from SQL ServerMigration to Redshift from SQL Server
Migration to Redshift from SQL Server
joeharris76
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502
kaziul Islam Bulbul
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]
shuwutong
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting for
Jason Strate
 

Semelhante a Sql waits (20)

Analyzing SQL Server wait stats, hands-on!
Analyzing SQL Server wait stats, hands-on!Analyzing SQL Server wait stats, hands-on!
Analyzing SQL Server wait stats, hands-on!
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database Performance
 
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
 
Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for Performance
 
Breaking data
Breaking dataBreaking data
Breaking data
 
collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdf
 
Migration to Redshift from SQL Server
Migration to Redshift from SQL ServerMigration to Redshift from SQL Server
Migration to Redshift from SQL Server
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTP
 
SQL Server Overview
SQL Server OverviewSQL Server Overview
SQL Server Overview
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502
 
PASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and BaseliningPASS VC: SQL Server Performance Monitoring and Baselining
PASS VC: SQL Server Performance Monitoring and Baselining
 
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
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource Manager
 
Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012
 
Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]Kb 40 kevin_klineukug_reading20070717[1]
Kb 40 kevin_klineukug_reading20070717[1]
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting for
 
The Evolution of the Oracle Database - Then, Now and Later (Fontys Hogeschool...
The Evolution of the Oracle Database - Then, Now and Later (Fontys Hogeschool...The Evolution of the Oracle Database - Then, Now and Later (Fontys Hogeschool...
The Evolution of the Oracle Database - Then, Now and Later (Fontys Hogeschool...
 

Último

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 

Último (20)

Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 

Sql waits

  • 1. ©2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice SQL Server 2008 WAITS Miroslav Dimitrov
  • 2. How SQL Server works ?! • SQL Server OS – Schedulers – Workers Lists to which workers can be assigned: worker waiter runnable I/O timer
  • 3. WAITS – What are they ?! • SQL Server 2000 – DBCC SQLPERF – ”sysprocesses” system view (waittype column) • SQL Server 2005 - DMVs – sys.dm_os_wait_stats – wait statistics – sys.dm_os_waiting_tasks – task-level wait information • SQL Server 2008 – new waits – Solve the problem with fine-grained analysis of wait statistics in SQL Server 2005
  • 4. Types of WAITS • Resource waits • Queue waits • External waits A SQL Server worker thread is not considered to be waiting if any of the following is true: • A resource becomes available. • A queue is nonempty. • An external process finishes.
  • 5. Waits • Memory Waits – CMEMTHREAD – RESOURCE_SEMAPHORE • Disk I/O Waits – IO_COMPLETION – ASYNC_IO_COMPLETION – WRITELOG – PAGEIOLATCH_* • Blocking waits – LCK_*
  • 6. Waits (continued) • CPU – CXPACKET – SOS_SCHEDULER_YIELD • Network Waits – ASYNC_NETWORK_IO – DBMIRROR_SEND • System waits – LAZYWRITER_SLEEP – REQUEST_FOR_DEADLOCK_SEARCH – SQLTRACE_BUFFER_FLUSH – XE_TIMER_EVENT – FT_IFTS_SCHEDULER_IDLE_WAIT – LOGMGR_QUEUE – CHECKPOINT_QUEUE – SLEEP_TASK – BROKER_TO_FLUSH
  • 7. Waits (continued) • Preemptive Wait Types • SQL Server extended events