cracking execution plans by sarabpreet singh anand

9
Cracking Execution Plans By Sarabpreet Singh Anand

Upload: felicia-lawrence

Post on 30-Dec-2015

213 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Cracking Execution Plans By Sarabpreet Singh Anand

Cracking Execution Plans

By

Sarabpreet Singh Anand

Page 2: Cracking Execution Plans By Sarabpreet Singh Anand

Sarabpreet Singh Anand

SQL Server MVP MCTS, MCITP: Admin, MCT certifications Vice President & Co-Founder of SQLServerGeeks.com Expert in handling VLDBs & Disaster Management

Conducted many SQL Server Boot camp Trainings Regular Speaker:

UG Events, In-person Events & Webcasts Microsoft Community Tech Days (CTD),Etc

Follow Me @Sarab_SQLGeek Email : [email protected] [email protected]

Page 3: Cracking Execution Plans By Sarabpreet Singh Anand

T-SQL?

DeclarativeYou tell – what to do.But you don’t tell How to do….!Exceptions:

Hints Plan guides Etc.

Page 4: Cracking Execution Plans By Sarabpreet Singh Anand

Query Execution Plan

What is a query execution planBuild from many operator blocksQuery tree

Page 5: Cracking Execution Plans By Sarabpreet Singh Anand

Execution Plans

What all it offers

How it is useful

What all it lacks?

Cost = time? (Myth)

Page 6: Cracking Execution Plans By Sarabpreet Singh Anand

Estimated & Actual

Estimated: compile Showplan_text Showplan_All Showplan_XML Graphical plan Sys.dm_exec_query_Plan Sys.dm_exec_text_query_plan

Actual Plan set statistics profile set statistics xml graphical plan

Page 7: Cracking Execution Plans By Sarabpreet Singh Anand

How to get Execution Plans What all information is importantDiff ways to get the informationWhat all methods are deprecatedUsing Extended Events to get execution plans\info

Let’s see:

Page 8: Cracking Execution Plans By Sarabpreet Singh Anand
Page 9: Cracking Execution Plans By Sarabpreet Singh Anand

Thank you

Request you to provide your valuable feedback

@[email protected]@gmail.com