• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
9th ssn  execution plans in microsoft sql server 2008 r2
 

9th ssn execution plans in microsoft sql server 2008 r2

on

  • 468 views

 

Statistics

Views

Total Views
468
Views on SlideShare
413
Embed Views
55

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 55

http://www.sqlschool.gr 51
http://localhost 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    9th ssn  execution plans in microsoft sql server 2008 r2 9th ssn execution plans in microsoft sql server 2008 r2 Presentation Transcript

    • SQL Saturday 9 th Night Execution Plans Microsoft SQL Server 2008 R2 Σάββατο 26/03/2011
    • Η παρουςίαςη αυτή καταγράφεται ώςτε να είναι διαθέςιμη ςεόςουσ θέλουν να την ξαναδούν, ή δεν είχαν την δυνατότητα νατην παρακολουθήςουν ςε πραγματικό χρόνο.Η παρουςίαςη αυτή διατίθεται δωρεάν.Εάν κάποιοσ από τουσ παραβριςκόμενουσ ςτην παρουςίαςηαυτή έχει το οποιοδήποτε πρόβλημα ή αντίρρηςη να είναι μέςαςτην καταγραφή αυτήσ, παρακαλείται να αποχωρήςει άμεςα.Σε διαφορετική περίπτωςη η παρουςία του εκλαμβάνεται ωσαποδοχή τησ καταγραφήσ.Η παρουςίαςη αρχίζει ςε 1 λεπτό…
    • Antonios ChatzipavlisSolution Architect - Principal ConsultantDevelopment Evangelist - SQL Server MVPMCT, MCITP, MCPD, MCSD, MCDBA, MCSA, MCTS, MCAD, MCP,OCA
    • AgendaExecution Plans in Microsoft SQL Server 2008 R2••• 4
    • Microsoft SQL Server 2008 R2 5
    • How a query executedBasics of Execution Plans in Microsoft SQL Server 2008 R2 Relational Engine QUERY Query Parse/Query/Sequence Algebrizer Query Processor Parsing Tree Output Process Tree Output Query Optimizer Estimated Statistics Models Execution Plan Storage Engine Query Actual Execution Execution Plan Actual Execution Plan Plan Cache Actual Execution Plan Actual Execution Plan Actual Execution Plan 6
    • Estimated vs Actual Execution PlansBasics of Execution Plans in Microsoft SQL Server 2008 R2• • •• • • 7
    • Execution Plan ReuseBasics of Execution Plans in Microsoft SQL Server 2008 R2• (previously called Procedure Cache)• Each plan is stored once in Plan Cache • Except if the optimizer sees parallelism, in this case one query gets two plans.• Execution Plans are not kept in memory forever. • Slowly aged out of the system using an “age” formula • Estimated Cost X Number of Times it has been used • Lazywriter process periodically scans the cache and decreases this value by one each time. 8
    • demo 9
    • Estimated != Actual Execution PlanBasics of Execution Plans in Microsoft SQL Server 2008 R2••• 10
    • Execution Plan FormatsBasics of Execution Plans in Microsoft SQL Server 2008 R2• • •• • • •• • • 11
    • demo 12
    • Interpreting Graphical Execution PlansBasics of Execution Plans in Microsoft SQL Server 2008 R2 13
    • Interpreting Text Execution PlansBasics of Execution Plans in Microsoft SQL Server 2008 R2 14
    • Microsoft SQL Server 2008 R2 15
    • The Icon LanguageThe Language of Graphical Execution Plans in Microsoft SQL Server 2008 R2 Clustered Index Scan Clustered Index Seek Non-Clustered Index Scan Non-Clustered Index Seek Key Lookup Table Scan RID LookUp Hash Match Nested Loops Merge Join Sort Filter 16
    • demo 17
    • Microsoft SQL Server 2008 R2 18
    • 19
    • demo 20
    • Contact Me – Follow meTwitter: antonioschBlog: sqlschoolgr.wordpress.comEmail: sqlschool.gr@gmail.com 21
    • Σας Ευχαριστώ 22
    • Rocking with Knowledge of SQL Server http://www.sqlschool.gr