Dave LinkedIn

Slides:



Advertisements
Similar presentations
Understanding SQL Server Query Execution Plans
Advertisements

EXECUTION PLANS By Nimesh Shah, Amit Bhawnani. Outline  What is execution plan  How are execution plans created  How to get an execution plan  Graphical.
Module 13: Optimizing Query Performance. Overview Introduction to the Query Optimizer Obtaining Execution Plan Information Using an Index to Cover a Query.
Virtual techdays INDIA │ 9-11 February 2011 SQL 2008 Query Tuning Praveen Srivatsa │ Principal SME – StudyDesk91 │ Director, AsthraSoft Consulting │ Microsoft.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Chapter 9: Creating Database Conventions & Standards MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Module 12: Optimizing Query Performance. Overview Introducing the Query Optimizer Tuning Performance Using SQL Utilities Using an Index to Cover a Query.
Denny Cherry Manager of Information Systems MVP, MCSA, MCDBA, MCTS, MCITP.
Module 7 Reading SQL Server® 2008 R2 Execution Plans.
Ashwani Roy Understanding Graphical Execution Plans Level 200.
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “QUERY OPTIMIZATION” Academic Year 2014 Spring.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
1 Chapter 10 Joins and Subqueries. 2 Joins & Subqueries Joins – Methods to combine data from multiple tables – Optimizer information can be limited based.
Microsoft AREC TAM Internship SQL Server Performance Tuning(I) Haijun Yang AREC SQL Support Team Feb, SQL Server 2000.
Session 1 Module 1: Introduction to Data Integrity
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
IMS 4212: Database Implementation 1 Dr. Lawrence West, Management Dept., University of Central Florida Physical Database Implementation—Topics.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
Eugene Meidinger Execution Plans
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
How to kill SQL Server Performance Håkan Winther.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
SQL Server Deep Dive Denis Reznik Data Architect at Intapp.
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
Execution Plans Detail From Zero to Hero İsmail Adar.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP SQL SERVER Database Administration.
Diving into Query Execution Plans ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
SQL Server Analysis Services Fundamentals
Execution Planning for Success
UFC #1433 In-Memory tables 2014 vs 2016
Introduction to SQL Server Management for the Non-DBA
Reading Execution Plans Successfully
Introduction to Execution Plans
The Key to the Database Engine
SQL Server Analysis Services Fundamentals
SQL Server Analysis Services Fundamentals
Dave LinkedIn SQL Server Execution Plans: How to use them to find performance bottlenecks Dave LinkedIn.
JULIE McLAIN-HARPER LINKEDIN: JM HARPER
Akshay Tomar Prateek Singh Lohchubh
Statistics: What are they and How do I use them
Reading Execution Plans Successfully
SQL Server Performance Tuning
Dave Bland LinkedIn SQL Server Execution Plans: How to use them to find performance bottlenecks Dave Bland LinkedIn
Query Processing CSD305 Advanced Databases.
Introduction to Execution Plans
Diving into Query Execution Plans
SQL Server Query Design and Optimization Recommendations
Introduction to Execution Plans
Reading execution plans successfully
T-SQL Basics: Coding for performance
Introduction to Execution Plans
Using wait stats to determine why my server is slow
Performance Tuning for SQL Developers through Execution Plans
Performance Tuning for SQL Developers through Execution Plans
Performance Tuning for SQL Developers through Execution Plans
Performance Tuning for SQL Developers through Execution Plans
Performance Tuning for SQL Developers through Execution Plans
Performance Tuning for SQL Developers through Execution Plans
Presentation transcript:

Dave LinkedIn

 13 years DBA Experience  Teaching SQL Server since 1999  SQL Server Instructor at Harper College, Palatine, IL  Currently supervise a team of DBAs  DBA consultant for Einstein Technology Solutions, Lombard, IL

Certifications

 How does SQL Server execute a query  Types of Execution Plans  Common query bottlenecks  Plan Cache  First Look at an Execution Plan  Execution Plan Icons and Identifying potential performance bottlenecks  SQL Sentry Plan Explorer

“ An execution plan, simply put, is the result of the query optimizer's attempt to calculate the most efficient way to implement the request represented by the T-SQL” Grant Fritchey - SQL Server Execution Plans Second Edition

 Minimum permissions needed: ShowPlan in the database  Members of Sysadmin role  Members of DB_Owner

 Disk I\O  CPU  Memory  Network  Poor query design  Missing indexes  Indexes not optimized  Statistics out of date

 Types of Plans ◦ Actual ◦ Estimated  Displaying Execution Plans ◦ Graphical plans ◦ Text plans (deprecated) ◦ XML plans  Saving ◦.SQLPLAN

 Algebrizer process creates a hash of incoming query(DML Only)  What flushes a plan from Cache ◦ Not enough memory ◦ DBCC FREEPROCCACHE ◦ Schema Changes to referenced objects ◦ Statistics used by the plan are updated ◦ Changes made to the stored procedure

Used for comparative purposes Float cursor over icon

 Index Scan vs Index Seek Scan searches data pages Seek is preferred for highly selective queries If scan, check for index or a useful index

 Usually considered less than optimal  If table is very small may not be an issue  If expecting an Index Scan or Seek:  Update statistics  Rebuild indexes  Review query

 Can be difficult to test on a development machine  Some statements can force a serial plan

 Use of cursor with sys.sp_Msforeachdb  Data type conversions  Foreign Key full table scan due to lack of index

 Happens when joining on different data types  Can lead to excessive CPU utilization  Can occur in the FROM or the WHERE clause

In this case, this is the Estimated Execution plan, actual was more accurate

 Only retrieve what you need  Minimize use of temporary tables  Avoid cursors  Work with your DBA to arrange good indexes to support filters, joins and ordering  Learn how to address tasks with different query approaches to compare performance

 Must have a baseline for normal performance  Establish at different times of day  Document the baseline

 Table redesign  Redesign query  More memory  Add Indexes  Optimize indexes  Update statistics  Reboot

 Microsoft SQL Server 2014 Query Tuning and Optimization – Benjamin Nevarez      Paul White Blog Paul White Blog

 Understanding Parallelism Understanding Parallelism  BrentOzar.com BrentOzar.com  SQL Server Execution Plans – Grant Fritchey 

DBA Blog