{"id":131,"date":"2008-10-06T22:57:46","date_gmt":"2008-10-06T20:57:46","guid":{"rendered":"https:\/\/www.sqlinthewild.co.za\/?p=131"},"modified":"2008-10-06T22:57:46","modified_gmt":"2008-10-06T20:57:46","slug":"execution-plan-more-properties","status":"publish","type":"post","link":"https:\/\/www.sqlinthewild.co.za\/index.php\/2008\/10\/06\/execution-plan-more-properties\/","title":{"rendered":"Execution plan &#8211; more properties"},"content":{"rendered":"<p>I ran across a few more properties visible in the exec plan that I thought would be useful to people. So, without further ado&#8230;<\/p>\n<p>Some overall properties of the entire execution can be seen by selecting the highest-level operator in the plan (the one on the left-most, typically the select, insert, update or delete operator) and then opening the properties window<\/p>\n<p><a href=\"https:\/\/www.sqlinthewild.co.za\/wp-content\/uploads\/2008\/09\/execplan-properties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-132\" title=\"execplan-properties\" src=\"https:\/\/www.sqlinthewild.co.za\/wp-content\/uploads\/2008\/09\/execplan-properties-300x227.png\" alt=\"\" width=\"300\" height=\"227\" \/><\/a><\/p>\n<p>The first four items, the compild plan size, compile CPU, compile Time and compile Memory all refer to the optimisation process that the query went through. They indicate how much in the way of server resources was spent compiling this query and how large the cached plan is in memory.<\/p>\n<p>This can be important when dealing with queries that recompile often or are very seldom reused<\/p>\n<p><!--more-->The degree of parallelism shows the actual number of processors used to execute the query. It&#8217;s only of interest if the query runs paralleled.<\/p>\n<p>The memory grant shows the amount of memory that the query processor needed to execute the query. This is typically for things like hashs or sorts. This may be useful for debugging memory consumption issues or insufficient memory errors<\/p>\n<p>The Optimisation Level and Reason for Early Termination describe the level to which the query was optimised. The optimiser is only permitted a certain about of time to optimise a query. That time is based on the complexity of the query. Those two properties indicate whether the optimiser was able to find a sufficiently good plan in the time allowed, or if it was forced to bail out and pick the best plan so far found. The Reason for Early Termination property is not always present<\/p>\n<p>The section on set options shows what various connection properties were set to when the query ran. This can be very handy for seeing why some cached plans are not getting reused.<\/p>\n<p>Finally, on SQL 2008 there are two more properties listed. Query hash and Query plan hash. For the low down on that, see this rticle by Bard Duncan &#8211; <a href=\"http:\/\/blogs.msdn.com\/bartd\/archive\/2008\/09\/03\/Query-Fingerprints-and-Plan-Fingerprints_3A00_-The-Best-New-SQL-2008-Feature-You_2700_ve-Never-Heard-Of.aspx\">Query Fingerprints and Plan Fingerprints (The Best SQL 2008 Feature That You&#8217;ve Never Heard Of)<\/a><\/p>\n<p>I think that&#8217;s enough theory on execution plans (please comment if you disagree). The next couple of articles in this series will be <a href=\"..\/index.php\/2008\/08\/28\/an-example-exec-plan\/\">examples of reading execution plans<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran across a few more properties visible in the exec plan that I thought would be useful to people. So, without further ado&#8230; Some overall properties of the entire execution can be seen by selecting the highest-level operator in&#8230; <a class=\"read-more-button\" href=\"https:\/\/www.sqlinthewild.co.za\/index.php\/2008\/10\/06\/execution-plan-more-properties\/\">(Read more)<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[23,15],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-execution-plans","category-sql-server"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7h6n-27","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlinthewild.co.za\/index.php\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}