SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
You Can Tune Your Own Code,[object Object],SQL Saturday #33 Charlotte,[object Object]
Who Is Mike?,[object Object],10 years with SQL,[object Object],DBA roles of various sorts,[object Object],Blog: www.straightpathsql.com/,[object Object],Syndicated at SQLServerPedia,[object Object],Full Time – Principal DBA at global insurance company.,[object Object],“Spare” Time – Consult for SQL Administration and Performance Issues,[object Object],President of new “Seacoast SQL” PASS Chapter,[object Object]
Who Are You?,[object Object]
“Why is this so slow?!”,[object Object],“It worked fine in dev!” ,[object Object],“The results came back fine… I’m done”,[object Object]
What Aren’t We Covering?,[object Object]
“Can’t you  ,[object Object],   just make it,[object Object],faster?!”,[object Object],http://www.flickr.com/photos/irinaslutsky/4000761728/,[object Object]
www.flickr.com/photos/no3rdw/170950846/,[object Object]
http://www.flickr.com/photos/dullhunk/359634390/,[object Object],www.flickr.com/photos/no3rdw/170950846/,[object Object]
Agenda,[object Object],[object Object]
The Right Mindset & Some Best Practices
Indexes & Statistics (Building Blocks)
Query Plans (Not So Scary)
SQL Profiler (Don’t tell my DBA friends..)
Put it all together and CLAP
DBAs don’t mean to be so mean**Maybe we do…, but let’s work it out,[object Object]
Goal 1,[object Object],You will leave using the concepts we discuss.,[object Object]
Goal 2,[object Object],You won’t ever say, “done” until you know your code,[object Object],PERFORMS,[object Object]
Goal 3,[object Object],“Can’t we all just get along??!”,[object Object]
Tips For Making Queries Slow,[object Object]
You Can Tune Your Own SQL Code
Right Mindset,[object Object]
Right Mindset,[object Object],[object Object]
Work With Sets
Watch Transaction Footprint
Join Where Necessary
Remember: Disk – Memory – Query
Smaller Sets ASAP
Work with the columns you need,[object Object]
How Are You Proving Your Code?,[object Object],[object Object]
Testing various scenarios?
Before/After Testing?
Using Empirical Evidence?
Look and Feel with a Stop Watch???,[object Object]
What Are Indexes?,[object Object],[object Object]
B-Tree Structures
Sometimes – Hero Makers
Sometimes – Frustrations,[object Object]
Narrower Is Better
Ever-Increasing
Order By

Más contenido relacionado

Destacado

MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues by Justin C. Koenitzer, Psy.d.Eric
 
Pixel Deployment Guide
Pixel Deployment GuidePixel Deployment Guide
Pixel Deployment GuideRecrue
 
juliana delgado s.s. work
juliana delgado s.s. workjuliana delgado s.s. work
juliana delgado s.s. workjulidelgado
 
Sql server baselines
Sql server baselinesSql server baselines
Sql server baselinesMike Walsh
 
Concept map 1111
Concept map 1111Concept map 1111
Concept map 1111julidelgado
 
Az Cftb Presentation
Az Cftb PresentationAz Cftb Presentation
Az Cftb PresentationIDSAVER
 
Web 3 Cisco Pulse
Web 3 Cisco PulseWeb 3 Cisco Pulse
Web 3 Cisco Pulseguest4513a7
 
C:\Fakepath\Promote Awud
C:\Fakepath\Promote AwudC:\Fakepath\Promote Awud
C:\Fakepath\Promote AwudCSFBookman
 
Concept map- juliana
Concept map- julianaConcept map- juliana
Concept map- julianajulidelgado
 
Ssc guidelines
Ssc guidelinesSsc guidelines
Ssc guidelineswarner
 
Veto-hanke OAKK loppuraportti
Veto-hanke OAKK loppuraporttiVeto-hanke OAKK loppuraportti
Veto-hanke OAKK loppuraporttiAtte Järvelä
 

Destacado (20)

MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
 
Ed0003
Ed0003Ed0003
Ed0003
 
Selling Agile At Your Company
Selling Agile At Your CompanySelling Agile At Your Company
Selling Agile At Your Company
 
Pixel Deployment Guide
Pixel Deployment GuidePixel Deployment Guide
Pixel Deployment Guide
 
juliana delgado s.s. work
juliana delgado s.s. workjuliana delgado s.s. work
juliana delgado s.s. work
 
Sql server baselines
Sql server baselinesSql server baselines
Sql server baselines
 
E:\Iprimi30
E:\Iprimi30E:\Iprimi30
E:\Iprimi30
 
Intro to the AMP
Intro to the AMPIntro to the AMP
Intro to the AMP
 
Concept map 1111
Concept map 1111Concept map 1111
Concept map 1111
 
Az Cftb Presentation
Az Cftb PresentationAz Cftb Presentation
Az Cftb Presentation
 
css navigation
css navigationcss navigation
css navigation
 
Web 3 Cisco Pulse
Web 3 Cisco PulseWeb 3 Cisco Pulse
Web 3 Cisco Pulse
 
C:\Fakepath\Promote Awud
C:\Fakepath\Promote AwudC:\Fakepath\Promote Awud
C:\Fakepath\Promote Awud
 
Concept map- juliana
Concept map- julianaConcept map- juliana
Concept map- juliana
 
Clt Placement Test
Clt Placement TestClt Placement Test
Clt Placement Test
 
Juli Trabajo
Juli TrabajoJuli Trabajo
Juli Trabajo
 
Ssc guidelines
Ssc guidelinesSsc guidelines
Ssc guidelines
 
My Most Recent Work
My Most Recent WorkMy Most Recent Work
My Most Recent Work
 
Veto-hanke OAKK loppuraportti
Veto-hanke OAKK loppuraporttiVeto-hanke OAKK loppuraportti
Veto-hanke OAKK loppuraportti
 
concept maps
concept mapsconcept maps
concept maps
 

Similar a You Can Tune Your Own SQL Code

Taking the Reins: Website Redesign by the Librarians, for the Users
Taking the Reins: Website Redesign by the Librarians, for the UsersTaking the Reins: Website Redesign by the Librarians, for the Users
Taking the Reins: Website Redesign by the Librarians, for the UsersMark O'English
 
Cracking the coding interview columbia - march 23 2011
Cracking the coding interview   columbia - march 23 2011Cracking the coding interview   columbia - march 23 2011
Cracking the coding interview columbia - march 23 2011careercup
 
How publishing works in the digital era
How publishing works in the digital eraHow publishing works in the digital era
How publishing works in the digital eraApex CoVantage
 
2016 0921 IMA MO-Stand-Out (Handout)
2016 0921 IMA MO-Stand-Out (Handout)2016 0921 IMA MO-Stand-Out (Handout)
2016 0921 IMA MO-Stand-Out (Handout)Invenio Advisors, LLC
 
SQL Server Dev ToolKit
SQL Server Dev ToolKitSQL Server Dev ToolKit
SQL Server Dev ToolKitKirsten Benzel
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleSteve Karam
 
Automating With Excel An Object Oriented Approach
Automating  With  Excel    An  Object  Oriented  ApproachAutomating  With  Excel    An  Object  Oriented  Approach
Automating With Excel An Object Oriented ApproachRazorleaf Corporation
 
Why Dashboards Fail
Why Dashboards FailWhy Dashboards Fail
Why Dashboards FailGeckoboard
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionJeff Smith
 
Elegant and Efficient Database Design
Elegant and Efficient Database DesignElegant and Efficient Database Design
Elegant and Efficient Database DesignBecky Sweger
 
What Are We Still Doing Wrong
What Are We Still Doing WrongWhat Are We Still Doing Wrong
What Are We Still Doing Wrongafa reg
 
Simplify Your Life with CQRS
Simplify Your Life with CQRSSimplify Your Life with CQRS
Simplify Your Life with CQRSJoel Mason
 
Paytm labs soyouwanttodatascience
Paytm labs soyouwanttodatasciencePaytm labs soyouwanttodatascience
Paytm labs soyouwanttodatascienceAdam Muise
 
SQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksSQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksIke Ellis
 
SQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutesSQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutesIke Ellis
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j PresentationMax De Marzi
 

Similar a You Can Tune Your Own SQL Code (20)

Taking the Reins: Website Redesign by the Librarians, for the Users
Taking the Reins: Website Redesign by the Librarians, for the UsersTaking the Reins: Website Redesign by the Librarians, for the Users
Taking the Reins: Website Redesign by the Librarians, for the Users
 
Cracking the coding interview columbia - march 23 2011
Cracking the coding interview   columbia - march 23 2011Cracking the coding interview   columbia - march 23 2011
Cracking the coding interview columbia - march 23 2011
 
How publishing works in the digital era
How publishing works in the digital eraHow publishing works in the digital era
How publishing works in the digital era
 
2016 0921 IMA MO-Stand-Out (Handout)
2016 0921 IMA MO-Stand-Out (Handout)2016 0921 IMA MO-Stand-Out (Handout)
2016 0921 IMA MO-Stand-Out (Handout)
 
SQL Server Dev ToolKit
SQL Server Dev ToolKitSQL Server Dev ToolKit
SQL Server Dev ToolKit
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
 
Automating With Excel An Object Oriented Approach
Automating  With  Excel    An  Object  Oriented  ApproachAutomating  With  Excel    An  Object  Oriented  Approach
Automating With Excel An Object Oriented Approach
 
Let's get along
Let's get alongLet's get along
Let's get along
 
Bollean Search - NageshRao
Bollean Search - NageshRaoBollean Search - NageshRao
Bollean Search - NageshRao
 
Why Dashboards Fail
Why Dashboards FailWhy Dashboards Fail
Why Dashboards Fail
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data EditionOracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
 
Elegant and Efficient Database Design
Elegant and Efficient Database DesignElegant and Efficient Database Design
Elegant and Efficient Database Design
 
JSSUG: SQL Sever Index Tuning
JSSUG: SQL Sever Index TuningJSSUG: SQL Sever Index Tuning
JSSUG: SQL Sever Index Tuning
 
What Are We Still Doing Wrong
What Are We Still Doing WrongWhat Are We Still Doing Wrong
What Are We Still Doing Wrong
 
Scalding at Etsy
Scalding at EtsyScalding at Etsy
Scalding at Etsy
 
Simplify Your Life with CQRS
Simplify Your Life with CQRSSimplify Your Life with CQRS
Simplify Your Life with CQRS
 
Paytm labs soyouwanttodatascience
Paytm labs soyouwanttodatasciencePaytm labs soyouwanttodatascience
Paytm labs soyouwanttodatascience
 
SQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & TricksSQL Pass Architecture SQL Tips & Tricks
SQL Pass Architecture SQL Tips & Tricks
 
SQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutesSQL PASS BAC - 60 reporting tips in 60 minutes
SQL PASS BAC - 60 reporting tips in 60 minutes
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j Presentation
 

Último

UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 

Último (20)

UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 

You Can Tune Your Own SQL Code