SlideShare a Scribd company logo
‘What object is served by this circle of misery
and violence and fear? It must tend to some
end, or else our universe is ruled by chance,
which is unthinkable.’
Sherlock Holmes
-The Cardboard Box
That’ll be TempDB
INVESTIGATE TEMPDB
LIKE
SHERLOCK HOLMES
Richard Douglas
• Sales Engineer, SQL Sentry
• Social Media: @SQLRich, LinkedIn,
• Blog Info: http://blogs.sqlsentry.com/author/RichardDouglas/;
http://SQL.RichardDouglas.co.uk
FREE SENTRY RESOURCES
•SQL Performance: www.sqlperformance.com
•Team Blogs: blogs.sqlsentry.comArticles:
•Educational and Product Videos at sqlsentry.tv
Videos:
•Trial Downloads at www.sqlsentry.com/HA-DR-Trial
•Free Plan Explorer at www.sqlsentry.com/HA-DR-PlanExplorerDownloads:
•Get our series of SQL Server Performance Tuning eBooks at www.sqlsentry.com/DBAFundamentals-eBooks. $10 value
each, for free!eBooks:
•To schedule a one-on-one demo yourself, go to www.sqlsentry.com/BookADemo.
•Or email us at SalesEngineering@sqlsentry.comDemos:
•Free query tuning advice at Answers.SQLPerformance.com
Services:
•Twitter: @SQLSentry | Facebook: Facebook.com/SQLSentry | LinkedIn: SQL Sentry, LLC
Community:
The Hairy
Execution
Plan Contest
starts in April!
YOUR HOST
• Richard Douglas
• Sales Engineer at SQL Sentry
• Blogs:
• http://blogs.sqlsentry.com/author/Richar
dDouglas
• http://SQL.RichardDouglas.co.uk
• Twitter: @SQLRich
• Email: RDouglas@SQLSentry.com
• Slides:
http://www.Slideshare.net/SQLRich
Book a Demo with me by going to
http://SQLSentry.com/BookRich
AGENDA
• Introduction to TempDB
• The life of a temporary object
• TempDB Architecture
• How queries affect TempDB
• Monitoring TempDB
• Obscure quotes
WHAT IS TEMPDB USED FOR
• Internal Objects
o Joins and aggregations
o Cursors
o INSTEAD OF Triggers
• Version Store
o DML Triggers
o Online Index Rebuilds
o Snapshot Isolation
• Query Operators
o Sorts
o Hashes
o Spools
• Temp Tables AND Table Variables
TEMP TABLE CREATION PROCESS
• An SGAM page is read to find a mixed
extent with space. An exclusive latch is
placed
• A PFS page is read to find a free page in
the chosen extent. Again an exclusive
latch is placed.
Things change in
SQL Server 2016
SGAM: Shared Global
Allocation Map
PFS: Page Free Space
Latch: Controls thread
access to in-memory data
structures
Why is this a problem?
‘It is a capital mistake to theorize before one has data.
Insensibly one begins to twist facts to suit theories, instead
of theories to suit facts.’
Sherlock Holmes
-A Scandal in Bohemia
YOU HAVE A GAMMY DATABASE
• Each User Database can have 1 or more Filegroups
• Each User Database can have 1 or more Data files in
said Filegroups
• By default TempDB has 1 Filegroup with 1 data file.
You cannot create a secondary Filegroup
• TempDB will pick up certain defaults from the Model
database
• TempDB is reinitialised upon service restart
YOU HAVE A GAMMY DATABASE (2)
• Each Data File has “special” pages
o PFS – Page Free Space, 1 per ca64MB
o GAM – Global Allocation Map, 1 per ca4GB
o SGAM – Shared Global Allocation Map , 1 per ca4GB
• By default TempDB has 1 data file sized
at 8MB
This means initially 1 SGAM page and
1 PFS page.
We have a resource bottleneck.
Page 1: First PFS
Page 2: The first GAM
Page 3: The first SGAM
page
HOW MANY TEMPDB FILES?
• Well it depends…
• Best current wisdom can be found in KB215845
As a general rule, if the number of logical processors is less
than or equal to 8, use the same number of data files as logical
processors. If the number of logical processors is greater than
8, use 8 data files and then if contention continues, increase the
number of data files by multiples of 4 (up to the number of
logical processors) until the contention is reduced to acceptable
levels or make changes to the workload/code.
ADDING TEMPDB FILES
ADDING TEMPDB FILES
2016 TEMP TABLE CREATION
PROCESS
• SQL Server 2016 enables the behaviour of
trace flags 1117 and 1118 by default.
• 1117 – Grow all files in a file group equally
• 1118 – Use uniform extents only
OTHER
NEW
FEATURES
Command line option for
multiple TempDB files can
be set via parameter
/SQLTEMPDBFILECOUNT
PERFORMANCE TUNING
ADAGE
‘It has long been an axiom of mine that the little things are
infinitely the most important.’
Sherlock Holmes
-A Case of Identity
TEMP TABLE CACHING
The following stops the ability to cache temp tables:
• Creating a named constraint
• Using DDL after creation
• Creating using dynamic SQL
• Used in an ad-hoc command
MEMORY GRANTS
• Query submitted
• Optimizer checks stats
• Predicts memory needed
• Tries to assign contiguous memory (Memory Grants
Pending)
• Query runs (Hopefully)
“The world is full of obvious things which nobody by any
chance ever observes.”
Sherlock Holmes
-The Hound of the Baskervilles
Chapter 3: “The Problem”
MEASURING TEMPDB
PERFORMANCE
PERFMON COUNTERS
• Access Methods – Workfiles Created/Sec
• Access Methods – Worktables Created/Sec
• Access Methods – Worktables From Cache Base
• Access Methods – Worktables From Cache Ratio
PERFMON COUNTERS
• Cursor Manager By Type – Cursor Worktable Usage
o TSQL Local Cursor
o TSQL Global Cursor
o API Cursor
• Cursor Manager Total – Cursor Conversion Rate
PERFMON COUNTERS
• General Statistics – Active Temp Tables
• General Statistics – Temp Tables Creation Rate
• General Statistics – Temp Tables For Destruction
• Logical Disk - Avg Disk Bytes/Read
• Logical Disk - Avg Disk Bytes/Write
• Logical Disk - Avg Disk sec/Read
• Logical Disk - Avg Disk sec/Write
PERFMON COUNTERS
• Transactions - Free Space in TempDB(KB)
• Transactions - Transactions
• Transactions - Snapshot Transactions
• Transactions - Version Cleanup Rate (KB/s)
• Transactions - Version Generation Rate(KB/s)
• Transactions - Version Store Size(KB)
SPACE USAGE
SELECT
SUM (user_object_reserved_page_count)*8 as Usr_Obj_kb,
SUM (internal_object_reserved_page_count)*8 as Internal_Obj_kb,
SUM (version_store_reserved_page_count)*8 as Version_Store_kb,
SUM (unallocated_extent_page_count)*8 as Freespace_kb,
SUM (mixed_extent_page_count)*8 as MixedExtent_kb
FROM sys.dm_db_file_space_usage
High % suggests majority of space is taken up by applications
creating temporary objects
SPACE USAGE
SELECT
SUM (user_object_reserved_page_count)*8 as Usr_Obj_kb,
SUM (internal_object_reserved_page_count)*8 as Internal_Obj_kb,
SUM (version_store_reserved_page_count)*8 as Version_Store_kb,
SUM (unallocated_extent_page_count)*8 as Freespace_kb,
SUM (mixed_extent_page_count)*8 as MixedExtent_kb
FROM sys.dm_db_file_space_usage
High % suggests majority of space is taken up by query plan
operators. Optimising queries will reduce space usage.
SPACE USAGE
SELECT
SUM (user_object_reserved_page_count)*8 as Usr_Obj_kb,
SUM (internal_object_reserved_page_count)*8 as Internal_Obj_kb,
SUM (version_store_reserved_page_count)*8 as Version_Store_kb,
SUM (unallocated_extent_page_count)*8 as Freespace_kb,
SUM (mixed_extent_page_count)*8 as MixedExtent_kb
FROM sys.dm_db_file_space_usage
High % suggests majority of space is taken up by version store.
Look to curtail long running queries.
SHERLOCK SAYS TO
BASELINE
‘You see, but you do not observe. The distinction is clear.’
Sherlock Holmes
-A Scandal in Bohemia
LEARN MORE ABOUT BASELINING
My Baselining session:
The Day After Tomorrow; Why You Need to Baseline
SQLBits Recording:
http://www.sqlbits.com/Sessions/Event12/The_Day_After_Tomorrow_Why_You_Nee
d_to_Baseline
SlideShare:
http://www.slideshare.net/SQLRich/the-day-after-tomorrow-why-you-need-to-
baseline-sql-rally-2013-amsterdam
‘Having gathered these facts, Watson, I smoked several
pipes over them, trying to separate those which were crucial
from others which were merely incidental.’
Sherlock Holmes
-The Crooked Man
THANK YOU!
• Slides will be available at http://Slideshare.net/SQLRich
• More information at:
o SQLSkills, et al
• E-mail ebooks@sqlsentry.com for free copies of our e-books:
o Just tell them where you met me
• My contact info for other questions:
o RDouglas@SQLSentry.com
o Twitter: @SQLRich
o Blogs: http://SQL.RichardDouglas.co.uk /
http://http://blogs.sqlsentry.com/author/RichardDouglas

More Related Content

What's hot

MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
Morgan Tocker
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Morgan Tocker
 
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
 
KoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganKoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just began
Tobias Koprowski
 
Sql Server 2014 In Memory
Sql Server 2014 In MemorySql Server 2014 In Memory
Sql Server 2014 In Memory
Ravi Okade
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
Kevin Kline
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
Ryusuke Kajiyama
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
Aurimas Mikalauskas
 
10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL
PostgreSQL-Consulting
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
BIWUG
 
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...
Dave Stokes
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...
Andy Kucharski
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
John Martin
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
Morgan Tocker
 
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerPLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
Marek Maśko
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
Gianluca Hotz
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changes
Morgan Tocker
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
Morgan Tocker
 
MySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMySQL 5.7: Core Server Changes
MySQL 5.7: Core Server Changes
Morgan Tocker
 

What's hot (20)

MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for 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
 
KoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just beganKoprowskiT - SQLBITS X - 2am a disaster just began
KoprowskiT - SQLBITS X - 2am a disaster just began
 
Sql Server 2014 In Memory
Sql Server 2014 In MemorySql Server 2014 In Memory
Sql Server 2014 In Memory
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
 
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...
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
 
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerPLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
 
Always on in sql server 2017
Always on in sql server 2017Always on in sql server 2017
Always on in sql server 2017
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changes
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
MySQL 5.7: Core Server Changes
MySQL 5.7: Core Server ChangesMySQL 5.7: Core Server Changes
MySQL 5.7: Core Server Changes
 

Viewers also liked

Fichatecnicatornado
FichatecnicatornadoFichatecnicatornado
Fichatecnicatornado
Laura Alicia Villarreal
 
Listado de alimentos_libres_de_gluten_24_04_2015
Listado de alimentos_libres_de_gluten_24_04_2015Listado de alimentos_libres_de_gluten_24_04_2015
Listado de alimentos_libres_de_gluten_24_04_2015
eldanoemi
 
Nano cuba
Nano cubaNano cuba
Nano cuba
mihaelz
 
MGC & NPHC Membership Intake Policy 2014
MGC & NPHC Membership Intake Policy 2014MGC & NPHC Membership Intake Policy 2014
MGC & NPHC Membership Intake Policy 2014
Michael Maksymowski
 
Helping Students Develop Their Unique Voice Online
Helping Students Develop Their Unique Voice OnlineHelping Students Develop Their Unique Voice Online
Helping Students Develop Their Unique Voice Online
Linda Lindsay
 
Anatomc3ada humana-cabeza
Anatomc3ada humana-cabezaAnatomc3ada humana-cabeza
Anatomc3ada humana-cabeza
Carlos Osorio Villaverde
 
MSc LL Katja Leszczynska 2010
MSc LL Katja Leszczynska 2010MSc LL Katja Leszczynska 2010
MSc LL Katja Leszczynska 2010
PlayLight
 
Vazquez Raña
Vazquez RañaVazquez Raña
Vazquez Raña
Cinthya Covarrubias
 
Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...
Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...
Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...
Gregory Carroll
 
Treinamento a importância da auto-motivação diária para vender mais.
Treinamento   a importância da auto-motivação diária para vender mais.Treinamento   a importância da auto-motivação diária para vender mais.
Treinamento a importância da auto-motivação diária para vender mais.
Pátio Iporanga Santos
 
El Problema Energético
El Problema EnergéticoEl Problema Energético
El Problema Energético
Joaquín Vidal
 
Web Strategies For Fundraising Success
Web Strategies For Fundraising SuccessWeb Strategies For Fundraising Success
Web Strategies For Fundraising Success
eTapestry
 
How we are perceived and how they could see us: selfie generation designs the...
How we are perceived and how they could see us: selfie generation designs the...How we are perceived and how they could see us: selfie generation designs the...
How we are perceived and how they could see us: selfie generation designs the...
Nieves Gonzalez
 
Natural Livestock Feasibility Study
Natural Livestock Feasibility StudyNatural Livestock Feasibility Study
Natural Livestock Feasibility Study
ElisaMendelsohn
 
Gestion del cambio
Gestion del cambioGestion del cambio
Gestion del cambio
JUAN F. BUENO
 
Pascual Sochedi07
Pascual Sochedi07Pascual Sochedi07
Pascual Sochedi07
Rodrigo Pascual
 
Regulasi k3
Regulasi k3Regulasi k3
Regulasi k3
Baraha Synyster
 
Das antiquarium, diemer
Das antiquarium, diemerDas antiquarium, diemer
Das antiquarium, diemer3153657
 
Pink floyd
Pink floydPink floyd

Viewers also liked (20)

Fichatecnicatornado
FichatecnicatornadoFichatecnicatornado
Fichatecnicatornado
 
Listado de alimentos_libres_de_gluten_24_04_2015
Listado de alimentos_libres_de_gluten_24_04_2015Listado de alimentos_libres_de_gluten_24_04_2015
Listado de alimentos_libres_de_gluten_24_04_2015
 
Nano cuba
Nano cubaNano cuba
Nano cuba
 
MGC & NPHC Membership Intake Policy 2014
MGC & NPHC Membership Intake Policy 2014MGC & NPHC Membership Intake Policy 2014
MGC & NPHC Membership Intake Policy 2014
 
Helping Students Develop Their Unique Voice Online
Helping Students Develop Their Unique Voice OnlineHelping Students Develop Their Unique Voice Online
Helping Students Develop Their Unique Voice Online
 
Anatomc3ada humana-cabeza
Anatomc3ada humana-cabezaAnatomc3ada humana-cabeza
Anatomc3ada humana-cabeza
 
MSc LL Katja Leszczynska 2010
MSc LL Katja Leszczynska 2010MSc LL Katja Leszczynska 2010
MSc LL Katja Leszczynska 2010
 
Vazquez Raña
Vazquez RañaVazquez Raña
Vazquez Raña
 
Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...
Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...
Photoactive Additives for Crosslinking Thin Polymer Films: Inhibition of Dewe...
 
Treinamento a importância da auto-motivação diária para vender mais.
Treinamento   a importância da auto-motivação diária para vender mais.Treinamento   a importância da auto-motivação diária para vender mais.
Treinamento a importância da auto-motivação diária para vender mais.
 
Batata
BatataBatata
Batata
 
El Problema Energético
El Problema EnergéticoEl Problema Energético
El Problema Energético
 
Web Strategies For Fundraising Success
Web Strategies For Fundraising SuccessWeb Strategies For Fundraising Success
Web Strategies For Fundraising Success
 
How we are perceived and how they could see us: selfie generation designs the...
How we are perceived and how they could see us: selfie generation designs the...How we are perceived and how they could see us: selfie generation designs the...
How we are perceived and how they could see us: selfie generation designs the...
 
Natural Livestock Feasibility Study
Natural Livestock Feasibility StudyNatural Livestock Feasibility Study
Natural Livestock Feasibility Study
 
Gestion del cambio
Gestion del cambioGestion del cambio
Gestion del cambio
 
Pascual Sochedi07
Pascual Sochedi07Pascual Sochedi07
Pascual Sochedi07
 
Regulasi k3
Regulasi k3Regulasi k3
Regulasi k3
 
Das antiquarium, diemer
Das antiquarium, diemerDas antiquarium, diemer
Das antiquarium, diemer
 
Pink floyd
Pink floydPink floyd
Pink floyd
 

Similar to Investigate TempDB Like Sherlock Holmes

Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation in
RahulBhole12
 
Redshift deep dive
Redshift deep diveRedshift deep dive
Redshift deep dive
Amazon Web Services LATAM
 
Leveraging Databricks for Spark Pipelines
Leveraging Databricks for Spark PipelinesLeveraging Databricks for Spark Pipelines
Leveraging Databricks for Spark Pipelines
Rose Toomey
 
Leveraging Databricks for Spark pipelines
Leveraging Databricks for Spark pipelinesLeveraging Databricks for Spark pipelines
Leveraging Databricks for Spark pipelines
Rose Toomey
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
Piyuesh Kumar
 
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Leveraging Structured Data To Reduce Disk, IO & Network BandwidthLeveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Perforce
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
cherryhillco
 
Geek Sync | Guide to Understanding and Monitoring Tempdb
Geek Sync | Guide to Understanding and Monitoring TempdbGeek Sync | Guide to Understanding and Monitoring Tempdb
Geek Sync | Guide to Understanding and Monitoring Tempdb
IDERA Software
 
SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015
Speedment, Inc.
 
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Spark Summit
 
Tachyon memory centric, fault tolerance storage for cluster framworks
Tachyon  memory centric, fault tolerance storage for cluster framworksTachyon  memory centric, fault tolerance storage for cluster framworks
Tachyon memory centric, fault tolerance storage for cluster framworks
Viet-Trung TRAN
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Bob Pusateri
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld
 
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010
Jason Ragsdale
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
Marius Adrian Popa
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
Jonas Bonér
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
Equnix Business Solutions
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
MongoDB
 
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
Hakka Labs
 

Similar to Investigate TempDB Like Sherlock Holmes (20)

Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation in
 
Redshift deep dive
Redshift deep diveRedshift deep dive
Redshift deep dive
 
Leveraging Databricks for Spark Pipelines
Leveraging Databricks for Spark PipelinesLeveraging Databricks for Spark Pipelines
Leveraging Databricks for Spark Pipelines
 
Leveraging Databricks for Spark pipelines
Leveraging Databricks for Spark pipelinesLeveraging Databricks for Spark pipelines
Leveraging Databricks for Spark pipelines
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Leveraging Structured Data To Reduce Disk, IO & Network BandwidthLeveraging Structured Data To Reduce Disk, IO & Network Bandwidth
Leveraging Structured Data To Reduce Disk, IO & Network Bandwidth
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
 
Geek Sync | Guide to Understanding and Monitoring Tempdb
Geek Sync | Guide to Understanding and Monitoring TempdbGeek Sync | Guide to Understanding and Monitoring Tempdb
Geek Sync | Guide to Understanding and Monitoring Tempdb
 
SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015SAP Open Source meetup/Speedment - Palo Alto 2015
SAP Open Source meetup/Speedment - Palo Alto 2015
 
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
 
Tachyon memory centric, fault tolerance storage for cluster framworks
Tachyon  memory centric, fault tolerance storage for cluster framworksTachyon  memory centric, fault tolerance storage for cluster framworks
Tachyon memory centric, fault tolerance storage for cluster framworks
 
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
Select Stars: A DBA's Guide to Azure Cosmos DB (SQL Saturday Oslo 2018)
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right
 
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar AhmedPGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
 
Hardware Provisioning
Hardware ProvisioningHardware Provisioning
Hardware Provisioning
 
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
 

Recently uploaded

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

Investigate TempDB Like Sherlock Holmes

  • 1. ‘What object is served by this circle of misery and violence and fear? It must tend to some end, or else our universe is ruled by chance, which is unthinkable.’ Sherlock Holmes -The Cardboard Box That’ll be TempDB
  • 2. INVESTIGATE TEMPDB LIKE SHERLOCK HOLMES Richard Douglas • Sales Engineer, SQL Sentry • Social Media: @SQLRich, LinkedIn, • Blog Info: http://blogs.sqlsentry.com/author/RichardDouglas/; http://SQL.RichardDouglas.co.uk
  • 3. FREE SENTRY RESOURCES •SQL Performance: www.sqlperformance.com •Team Blogs: blogs.sqlsentry.comArticles: •Educational and Product Videos at sqlsentry.tv Videos: •Trial Downloads at www.sqlsentry.com/HA-DR-Trial •Free Plan Explorer at www.sqlsentry.com/HA-DR-PlanExplorerDownloads: •Get our series of SQL Server Performance Tuning eBooks at www.sqlsentry.com/DBAFundamentals-eBooks. $10 value each, for free!eBooks: •To schedule a one-on-one demo yourself, go to www.sqlsentry.com/BookADemo. •Or email us at SalesEngineering@sqlsentry.comDemos: •Free query tuning advice at Answers.SQLPerformance.com Services: •Twitter: @SQLSentry | Facebook: Facebook.com/SQLSentry | LinkedIn: SQL Sentry, LLC Community: The Hairy Execution Plan Contest starts in April!
  • 4. YOUR HOST • Richard Douglas • Sales Engineer at SQL Sentry • Blogs: • http://blogs.sqlsentry.com/author/Richar dDouglas • http://SQL.RichardDouglas.co.uk • Twitter: @SQLRich • Email: RDouglas@SQLSentry.com • Slides: http://www.Slideshare.net/SQLRich
  • 5. Book a Demo with me by going to http://SQLSentry.com/BookRich
  • 6. AGENDA • Introduction to TempDB • The life of a temporary object • TempDB Architecture • How queries affect TempDB • Monitoring TempDB • Obscure quotes
  • 7. WHAT IS TEMPDB USED FOR • Internal Objects o Joins and aggregations o Cursors o INSTEAD OF Triggers • Version Store o DML Triggers o Online Index Rebuilds o Snapshot Isolation • Query Operators o Sorts o Hashes o Spools • Temp Tables AND Table Variables
  • 8. TEMP TABLE CREATION PROCESS • An SGAM page is read to find a mixed extent with space. An exclusive latch is placed • A PFS page is read to find a free page in the chosen extent. Again an exclusive latch is placed. Things change in SQL Server 2016 SGAM: Shared Global Allocation Map PFS: Page Free Space Latch: Controls thread access to in-memory data structures Why is this a problem?
  • 9. ‘It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.’ Sherlock Holmes -A Scandal in Bohemia
  • 10. YOU HAVE A GAMMY DATABASE • Each User Database can have 1 or more Filegroups • Each User Database can have 1 or more Data files in said Filegroups • By default TempDB has 1 Filegroup with 1 data file. You cannot create a secondary Filegroup • TempDB will pick up certain defaults from the Model database • TempDB is reinitialised upon service restart
  • 11. YOU HAVE A GAMMY DATABASE (2) • Each Data File has “special” pages o PFS – Page Free Space, 1 per ca64MB o GAM – Global Allocation Map, 1 per ca4GB o SGAM – Shared Global Allocation Map , 1 per ca4GB • By default TempDB has 1 data file sized at 8MB This means initially 1 SGAM page and 1 PFS page. We have a resource bottleneck. Page 1: First PFS Page 2: The first GAM Page 3: The first SGAM page
  • 12. HOW MANY TEMPDB FILES? • Well it depends… • Best current wisdom can be found in KB215845 As a general rule, if the number of logical processors is less than or equal to 8, use the same number of data files as logical processors. If the number of logical processors is greater than 8, use 8 data files and then if contention continues, increase the number of data files by multiples of 4 (up to the number of logical processors) until the contention is reduced to acceptable levels or make changes to the workload/code.
  • 15. 2016 TEMP TABLE CREATION PROCESS • SQL Server 2016 enables the behaviour of trace flags 1117 and 1118 by default. • 1117 – Grow all files in a file group equally • 1118 – Use uniform extents only
  • 16. OTHER NEW FEATURES Command line option for multiple TempDB files can be set via parameter /SQLTEMPDBFILECOUNT
  • 17.
  • 18. PERFORMANCE TUNING ADAGE ‘It has long been an axiom of mine that the little things are infinitely the most important.’ Sherlock Holmes -A Case of Identity
  • 19.
  • 20. TEMP TABLE CACHING The following stops the ability to cache temp tables: • Creating a named constraint • Using DDL after creation • Creating using dynamic SQL • Used in an ad-hoc command
  • 21. MEMORY GRANTS • Query submitted • Optimizer checks stats • Predicts memory needed • Tries to assign contiguous memory (Memory Grants Pending) • Query runs (Hopefully)
  • 22. “The world is full of obvious things which nobody by any chance ever observes.” Sherlock Holmes -The Hound of the Baskervilles Chapter 3: “The Problem”
  • 24. PERFMON COUNTERS • Access Methods – Workfiles Created/Sec • Access Methods – Worktables Created/Sec • Access Methods – Worktables From Cache Base • Access Methods – Worktables From Cache Ratio
  • 25. PERFMON COUNTERS • Cursor Manager By Type – Cursor Worktable Usage o TSQL Local Cursor o TSQL Global Cursor o API Cursor • Cursor Manager Total – Cursor Conversion Rate
  • 26. PERFMON COUNTERS • General Statistics – Active Temp Tables • General Statistics – Temp Tables Creation Rate • General Statistics – Temp Tables For Destruction • Logical Disk - Avg Disk Bytes/Read • Logical Disk - Avg Disk Bytes/Write • Logical Disk - Avg Disk sec/Read • Logical Disk - Avg Disk sec/Write
  • 27. PERFMON COUNTERS • Transactions - Free Space in TempDB(KB) • Transactions - Transactions • Transactions - Snapshot Transactions • Transactions - Version Cleanup Rate (KB/s) • Transactions - Version Generation Rate(KB/s) • Transactions - Version Store Size(KB)
  • 28. SPACE USAGE SELECT SUM (user_object_reserved_page_count)*8 as Usr_Obj_kb, SUM (internal_object_reserved_page_count)*8 as Internal_Obj_kb, SUM (version_store_reserved_page_count)*8 as Version_Store_kb, SUM (unallocated_extent_page_count)*8 as Freespace_kb, SUM (mixed_extent_page_count)*8 as MixedExtent_kb FROM sys.dm_db_file_space_usage High % suggests majority of space is taken up by applications creating temporary objects
  • 29. SPACE USAGE SELECT SUM (user_object_reserved_page_count)*8 as Usr_Obj_kb, SUM (internal_object_reserved_page_count)*8 as Internal_Obj_kb, SUM (version_store_reserved_page_count)*8 as Version_Store_kb, SUM (unallocated_extent_page_count)*8 as Freespace_kb, SUM (mixed_extent_page_count)*8 as MixedExtent_kb FROM sys.dm_db_file_space_usage High % suggests majority of space is taken up by query plan operators. Optimising queries will reduce space usage.
  • 30. SPACE USAGE SELECT SUM (user_object_reserved_page_count)*8 as Usr_Obj_kb, SUM (internal_object_reserved_page_count)*8 as Internal_Obj_kb, SUM (version_store_reserved_page_count)*8 as Version_Store_kb, SUM (unallocated_extent_page_count)*8 as Freespace_kb, SUM (mixed_extent_page_count)*8 as MixedExtent_kb FROM sys.dm_db_file_space_usage High % suggests majority of space is taken up by version store. Look to curtail long running queries.
  • 31. SHERLOCK SAYS TO BASELINE ‘You see, but you do not observe. The distinction is clear.’ Sherlock Holmes -A Scandal in Bohemia
  • 32. LEARN MORE ABOUT BASELINING My Baselining session: The Day After Tomorrow; Why You Need to Baseline SQLBits Recording: http://www.sqlbits.com/Sessions/Event12/The_Day_After_Tomorrow_Why_You_Nee d_to_Baseline SlideShare: http://www.slideshare.net/SQLRich/the-day-after-tomorrow-why-you-need-to- baseline-sql-rally-2013-amsterdam
  • 33. ‘Having gathered these facts, Watson, I smoked several pipes over them, trying to separate those which were crucial from others which were merely incidental.’ Sherlock Holmes -The Crooked Man
  • 34. THANK YOU! • Slides will be available at http://Slideshare.net/SQLRich • More information at: o SQLSkills, et al • E-mail ebooks@sqlsentry.com for free copies of our e-books: o Just tell them where you met me • My contact info for other questions: o RDouglas@SQLSentry.com o Twitter: @SQLRich o Blogs: http://SQL.RichardDouglas.co.uk / http://http://blogs.sqlsentry.com/author/RichardDouglas