Eugene Meidinger Execution Plans

Slides:



Advertisements
Similar presentations
Understanding SQL Server Query Execution Plans
Advertisements

SQL Performance 2011/12 Joe Chang, SolidQ
Information Systems in Business
Basic Execution Plans Eugene
EXECUTION PLANS By Nimesh Shah, Amit Bhawnani. Outline  What is execution plan  How are execution plans created  How to get an execution plan  Graphical.
Dos and don’ts of Columnstore indexes The basis of xVelocity in-memory technology What’s it all about The compression methods (RLE / Dictionary encoding)
Eugene Meidinger Execution Plans
David Konopnicki Choosing Access Path ä The basic methods. ä The access paths and when they are available. ä How the optimizer chooses among the.
Virtual techdays INDIA │ 9-11 February 2011 SQL 2008 Query Tuning Praveen Srivatsa │ Principal SME – StudyDesk91 │ Director, AsthraSoft Consulting │ Microsoft.
Tempdb Parasites Jason Hall-Dir. of Client SQL Sentry Blog-jasonhall.blogs.sqlsentry.net.
Microsoft Access 2007 Microsoft Access 2007 Introduction to Database Programs.
SQL Server Query Optimizer Cost Formulas Joe Chang
AN INTRODUCTION TO EXECUTION PLAN OF QUERIES These slides have been adapted from a presentation originally made by ORACLE. The full set of original slides.
The query processor does what the query plan tells it to do A “good” query plan is essential for a well- performing.
Module 8 Improving Performance through Nonclustered Indexes.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
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.
Querying Large Databases Rukmini Kaushik. Purpose Research for efficient algorithms and software architectures of query engines.
Query Processing. Steps in Query Processing Validate and translate the query –Good syntax. –All referenced relations exist. –Translate the SQL to relational.
11-1 Improve response time of interactive programs. Improve batch throughput. To ensure scalability of applications load vs. performance. Reduce system.
1 Copyright © 2004, Oracle. All rights reserved. Introduction.
Query Optimizer Execution Plan Cost Model Joe Chang
Indexes and Views Unit 7.
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
Dave LinkedIn
How to kill SQL Server Performance Håkan Winther.
Eugene Meidinger PowerBI: Start to
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
Execution Plans Detail From Zero to Hero İsmail Adar.
LAB: Web-scale Data Management on a Cloud Lab 11. Query Execution Plan 2011/05/27.
Diving into Query Execution Plans ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
Eugene Meidinger Power BI: Start to
Eugene Meidinger Intermediate Querying: Going Beyond Select
Power BI: Getting Started and Keeping Up
Power BI Internals Eugene
An (Advanced) Introduction to DAX
Execution Planning for Success
An (Advanced) Introduction to DAX
Reading execution plans successfully
Reading Execution Plans Successfully
Introduction to Execution Plans
The Key to the Database Engine
JULIE McLAIN-HARPER LINKEDIN: JM HARPER
Execution Plans Demystified
Reading Execution Plans Successfully
SQL Server Query Plans Journeyman and Beyond
The PROCESS of Queries John Deardurff Website: ThatAwesomeTrainer.com
Introduction to reading execution plans
Dave Bland LinkedIn SQL Server Execution Plans: How to use them to find performance bottlenecks Dave Bland LinkedIn
Four Rules For Columnstore Query Performance
Introduction to Execution Plans
Power BI Part 1: A Business User’s Perspective
Power BI Part 2: Internals
EXECUTION PLANS Quick Dive.
Execution plans Eugene
Diving into Query Execution Plans
Introduction to Execution Plans
Power BI: Start to Finish
SQL Server 2019: What’s new? Eugene Meidinger
Reading execution plans successfully
Introduction to Execution Plans
Welcome!.
Performance Tuning ETL Process
All about Indexes Gail Shaw.
Presentation transcript:

Eugene Meidinger Execution Plans

About me Certified in querying and administering SQL Server Spoken at Pittsburgh SQL User Group and SQL Saturdays Worked for All-Lines / Lantek for 4 years Went from SQL newb to SQL pro Couldn’t distinguish stored procedure from a view Don’t go to the afterparty. You could end up like me!

Our programs will reduce IT costs, improve performance of the network, and assure a consistent level of service. Managed Services We provide assessment, design, implementation, management, monitoring, and computer support services for all business computing needs. IT Consulting SharePoint and Office 365 give you and the people you work with a better way to get things done together. Microsoft Solutions We provide IT staffing services for a variety of industries in the local market including manufacturing, finance, healthcare, among others. IT Staffing Our Services All Lines/LANtek is the only IT Services company in the region able to deliver the full range of services we can. From hardware to hosting we can keep your business efficient and in top production. We provide proofs of concepts and assessments in all of these areas. We can also provide demos on site at our data center in Warrendale. Enterprise Infrastructure

What is this talk about? What is an execution plan How to view an execution plan What does a plan look like How to read one Demo BONUS???? Resources

Instructions for how to process a query Can think of it as a recipe Created by the query optimizer at run time Execution plans are cached after the first run Many different ways to process the same query For trivial queries, a simple plan is used Can be forced with hints Don’t try to outsmart the database engine What is an execution plan?

How to view the execution plan? Go to Query Click Include Actual Execution Plan Or, Press Ctrl + M Or click the execution plan icon on the toolbar

What does a plan look like?

Read from right to left and top to bottom Icons represent operators Operators have cost below them Arrows represent data flow Bigger arrows represent more data Hover over icons and arrows for more detail How to read an execution plan

Reading the Arrows

Reading the Popup box Focus on the top, bottom, cost and estimated versus actual Top explains the operator Bottom is the important detail Est vs. Act can be a problem The rest isn’t important yet

Basic Operators Select Top Sort Compute Scalar

Scans and seeks Scan versus seek Scan – Going through all of the rows Seek – Going to a specific row Clustered versus nonclustered Clustered – using the whole table Nonclustered – taking advantage of the index Tables versus heaps Key Lookup – uses the primary key to find a row RID Lookup – uses the row number in a heap to find a row

Joins Merge Join – Joins two sorted datasets Nested loop join – Loops a small data set over a larger one Hash join – A hash table is made with the smaller input

Missing index SQL Server will suggest an index if needed Use with caution

Comparing Queries Query Cost – Relative to Batch Run multiple queries to compare them

Demo

Bonus Slides! – SQL Plan Explorer

Bonus Slides! – Live Execution Plans

Bonus Slides! – Fooling the estimator When “Estimated rows” goes horribly wrong Example by Kendra Little when-row-estimates-get-high/ when-row-estimates-get-high/

Adventure Works Database Execution Plan Basics by Grant Fritchey Execution Plan Basics SQL Server Execution Plans, Second Edition by Grant Fritchey SQL Server Execution Plans, Second Edition SQL Plan Explorer by SQL Sentry SQL Plan Explorer Resources

Evaluations Session Evaluation sessionevaluation.aspx Event Evaluation