{"id":556,"date":"2010-12-08T22:53:00","date_gmt":"2010-12-08T22:53:00","guid":{"rendered":"\/blogs\/jonathan\/post\/An-XEvent-a-Day-(8-of-31)-Targets-Week-synchronous_event_counter.aspx"},"modified":"2017-04-13T12:18:35","modified_gmt":"2017-04-13T16:18:35","slug":"an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/","title":{"rendered":"An XEvent a Day (8 of 31) &#8211; Targets Week &#8211; synchronous_event_counter"},"content":{"rendered":"<p>Yesterday\u2019s post, <a href=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-7-of-31-targets-week-bucketizers\/\" target=\"_blank\">Targets Week &#8211; Bucketizers<\/a>, looked at the bucketizer Targets in Extended Events and how they can be used to simplify analysis and perform more targeted analysis based on their output.&#160; Today\u2019s post will be fairly short, by comparison to the previous posts, while we look at the synchronous_event_counter target, which can be used to test the impact of an Event Session without actually incurring the cost of Event collection.<\/p>\n<h2>What is the synchronous_event_counter?<\/h2>\n<p>The synchronous_event_count simply put, is a Target that counts the number of Events that fire for a given Event Session.&#160; It can be used to test whether or not the defined Predicates on Events in an Event Session perform the level of filtering expected, without having to actually perform full Event collection using one of the raw Event data targets like the ring_buffer or asynchronous_file_target.&#160; The Target is synchronous however, due to the fact that it only counts the number of times each Event fires, its impact is minimized in comparison to the other synchronous targets available.&#160; Like the ring_buffer and bucketizer, the synchronous_event_counter Target is a memory resident Target that holds event data in memory while the Event Session is active on the SQL Server.&#160; When the Event Session is stopped, the memory buffers allocated to the synchronous_event_counter target are freed and any information contained in the target is lost. <\/p>\n<h2>Configuration Options<\/h2>\n<p>There are no configuration options for the synchronous_event_counter Target. (see I said this was going to be a short post comparatively).<\/p>\n<blockquote>\n<pre class=\"code\"> <span style=\"color: green\">-- Target Configurable Fields\r\n<\/span><span style=\"color: blue\">SELECT \r\n   <\/span>oc<span style=\"color: gray\">.<\/span>name <span style=\"color: blue\">AS <\/span>column_name<span style=\"color: gray\">,\r\n   <\/span>oc<span style=\"color: gray\">.<\/span>column_id<span style=\"color: gray\">,\r\n   <\/span>oc<span style=\"color: gray\">.<\/span><span style=\"color: magenta\">type_name<\/span><span style=\"color: gray\">,\r\n   <\/span>oc<span style=\"color: gray\">.<\/span>capabilities_desc<span style=\"color: gray\">,\r\n   <\/span>oc<span style=\"color: gray\">.<\/span><span style=\"color: blue\">description\r\nFROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_packages <\/span><span style=\"color: blue\">AS <\/span>p\r\n<span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_objects <\/span><span style=\"color: blue\">AS <\/span>o \r\n    <span style=\"color: blue\">ON <\/span>p<span style=\"color: gray\">.<\/span><span style=\"color: blue\">guid <\/span><span style=\"color: gray\">= <\/span>o<span style=\"color: gray\">.<\/span>package_guid\r\n<span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_object_columns <\/span><span style=\"color: blue\">AS <\/span>oc \r\n    <span style=\"color: blue\">ON <\/span>o<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span>oc<span style=\"color: gray\">.<\/span><span style=\"color: magenta\">OBJECT_NAME \r\n   <\/span><span style=\"color: gray\">AND <\/span>o<span style=\"color: gray\">.<\/span>package_guid <span style=\"color: gray\">= <\/span>oc<span style=\"color: gray\">.<\/span>object_package_guid\r\n<span style=\"color: blue\">WHERE<\/span><span style=\"color: gray\">(<\/span>p<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">IS NULL OR <\/span>p<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">)\r\n  AND (<\/span>o<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">IS NULL OR <\/span>o<span style=\"color: gray\">.<\/span>capabilities <span style=\"color: gray\">&amp; <\/span>1 <span style=\"color: gray\">= <\/span>0<span style=\"color: gray\">)\r\n  AND <\/span>o<span style=\"color: gray\">.<\/span>object_type <span style=\"color: gray\">= <\/span><span style=\"color: red\">'target'\r\n  <\/span><span style=\"color: gray\">AND <\/span>o<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'synchronous_event_counter'<\/span><\/pre>\n<p>  <a href=\"http:\/\/www.11011.net\/software\/vspaste\"><\/a><a href=\"http:\/\/www.11011.net\/software\/vspaste\"><\/a><\/p><\/blockquote>\n<p><a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/22185ad4\/image.png\"><img decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png\" width=\"415\" height=\"61\" \/><\/a> <\/p>\n<h2>Understanding the Target Data Format<\/h2>\n<p>Like the ring_buffer and bucketizer Targets, the synchronous_event_counter Target returns its information by querying the sys.dm_xe_session_targets DMV, and it returns the Target data in an XML format that is not schema bound, but that has a standardized format.&#160; The synchronous_event_counter Target has a very simple XML document, much like the bucketizer Targets.&#160; The root node of the XML is the &lt;CounterTarget&gt; node which has a child node &lt;Packages&gt; which has a child &lt;Package&gt; node for each package that identifies the package using an @name attribute.&#160; Each &lt;Package&gt; node will have one or more &lt;Event&gt; nodes based on the number of Events defined in the Event Session for that particular package.&#160; The &lt;Event&gt; nodes each will contain two attributes, the name of the event and the count for its occurrence since the Event Session started.&#160; A simplified representation of the XML output by the synchronous_event_counter Target is below:<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">&lt;<\/span><span style=\"color: #a31515\">CounterTarget <\/span><span style=\"color: red\">truncated<\/span><span style=\"color: blue\">=<\/span>&quot;&quot;<span style=\"color: blue\">&gt;\r\n  &lt;<\/span><span style=\"color: #a31515\">Packages<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">Package <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;&quot;<span style=\"color: blue\">&gt;\r\n      &lt;<\/span><span style=\"color: #a31515\">Event <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">count<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: blue\">\/&gt;\r\n    &lt;\/<\/span><span style=\"color: #a31515\">Package<\/span><span style=\"color: blue\">&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">Packages<\/span><span style=\"color: blue\">&gt;\r\n&lt;\/<\/span><span style=\"color: #a31515\">CounterTarget<\/span><span style=\"color: blue\">&gt;<\/span><\/pre>\n<p>  <a href=\"http:\/\/www.11011.net\/software\/vspaste\"><\/a><\/p><\/blockquote>\n<h2>Querying\/Parsing the Target Data<\/h2>\n<p>Like the other memory resident Targets in Extended Events, the synchronous_event_counter Target data is only exposed by querying the sys.dm_xe_session_targets DMV.&#160; The following example will demonstrate how the synchronous_event_counter can be used to test the number of Events that an Event Session will generate:<\/p>\n<blockquote><\/blockquote>\n<blockquote>\n<pre class=\"code\"><span style=\"color: green\">-- Create an Event Session to Track Recompiles\r\n<\/span><span style=\"color: blue\">IF <\/span><span style=\"color: gray\">EXISTS(<\/span><span style=\"color: blue\">SELECT <\/span><span style=\"color: gray\">* <\/span><span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">server_event_sessions <\/span><span style=\"color: blue\">WHERE <\/span>name<span style=\"color: gray\">=<\/span><span style=\"color: red\">'CounterTargetDemo'<\/span><span style=\"color: gray\">)\r\n    <\/span><span style=\"color: blue\">DROP EVENT SESSION <\/span>[CounterTargetDemo] <span style=\"color: blue\">ON SERVER<\/span><span style=\"color: gray\">;\r\n<\/span><span style=\"color: blue\">CREATE EVENT SESSION <\/span>[CounterTargetDemo]\r\n<span style=\"color: blue\">ON SERVER\r\nADD EVENT <\/span>sqlserver<span style=\"color: gray\">.<\/span>sql_statement_starting<span style=\"color: gray\">,\r\n<\/span><span style=\"color: blue\">ADD EVENT <\/span>sqlos<span style=\"color: gray\">.<\/span>wait_info\r\n<span style=\"color: gray\">(    <\/span><span style=\"color: blue\">WHERE <\/span><span style=\"color: gray\">(<\/span>duration <span style=\"color: gray\">&gt; <\/span>0<span style=\"color: gray\">))\r\n<\/span><span style=\"color: blue\">ADD TARGET <\/span>package0<span style=\"color: gray\">.<\/span>synchronous_event_counter\r\n<span style=\"color: blue\">GO\r\n\r\n<\/span><span style=\"color: green\">-- Start the Event Session\r\n<\/span><span style=\"color: blue\">ALTER EVENT SESSION <\/span>[CounterTargetDemo]\r\n<span style=\"color: blue\">ON SERVER\r\nSTATE<\/span><span style=\"color: gray\">=<\/span><span style=\"color: blue\">STOP\r\nGO\r\n\r\n<\/span><span style=\"color: green\">-- Wait for Events to generate and then Query Target\r\n\r\n-- Query the Target\r\n<\/span><span style=\"color: blue\">SELECT \r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'..\/@name[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'varchar(50)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>PackageName<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'@name[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'varchar(50)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>EventName<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'@count[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>Occurence\r\n<span style=\"color: blue\">FROM\r\n<\/span><span style=\"color: gray\">(\r\n<\/span><span style=\"color: blue\">SELECT <\/span><span style=\"color: magenta\">CAST<\/span><span style=\"color: gray\">(<\/span>target_data <span style=\"color: blue\">AS XML<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>target_data\r\n<span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_sessions <\/span><span style=\"color: blue\">AS <\/span>s \r\n<span style=\"color: gray\">JOIN <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">dm_xe_session_targets <\/span><span style=\"color: blue\">AS <\/span>t \r\n    <span style=\"color: blue\">ON <\/span>t<span style=\"color: gray\">.<\/span>event_session_address <span style=\"color: gray\">= <\/span>s<span style=\"color: gray\">.<\/span><span style=\"color: blue\">address\r\nWHERE <\/span>s<span style=\"color: gray\">.<\/span>name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'CounterTargetDemo'\r\n  <\/span><span style=\"color: gray\">AND <\/span>t<span style=\"color: gray\">.<\/span>target_name <span style=\"color: gray\">= <\/span><span style=\"color: red\">'synchronous_event_counter'\r\n<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>tab\r\n<span style=\"color: gray\">CROSS APPLY <\/span>target_data<span style=\"color: gray\">.<\/span>nodes<span style=\"color: gray\">(<\/span><span style=\"color: red\">'CounterTarget\/Packages\/Package\/Event'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>q<span style=\"color: gray\">(<\/span>n<span style=\"color: gray\">)\r\n\r\n<\/span><span style=\"color: green\">-- Drop the Event Session\r\n<\/span><span style=\"color: blue\">IF <\/span><span style=\"color: gray\">EXISTS(<\/span><span style=\"color: blue\">SELECT <\/span><span style=\"color: gray\">* <\/span><span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">server_event_sessions <\/span><span style=\"color: blue\">WHERE <\/span>name<span style=\"color: gray\">=<\/span><span style=\"color: red\">'CounterTargetDemo'<\/span><span style=\"color: gray\">)\r\n    <\/span><span style=\"color: blue\">DROP EVENT SESSION <\/span>[CounterTargetDemo] <span style=\"color: blue\">ON SERVER<\/span><span style=\"color: gray\">;<\/span><\/pre>\n<p>  <a href=\"http:\/\/www.11011.net\/software\/vspaste\"><\/a><\/p><\/blockquote>\n<p>This session on one of my test servers generated the following output while running for less than five seconds:<\/p>\n<p><a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/6edc216a\/image.png\"><img decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/1f8f2916\/image_thumb.png\" width=\"311\" height=\"63\" \/><\/a> <\/p>\n<p>Based on this number of Events being fired, it may be determined that the predicates for the session need to provide further filtering of the Events, or if it is determined that the Predicates are filtering the Events as intended, this at least lets us know that the number of Events firing will require the use of the asynchronous_file_target, if the plan is to look at the Events raw data.<\/p>\n<h2>Considerations for Usage<\/h2>\n<p>The only real consideration associated with the synchronous_event_counter Target is that it is an synchronous Target.&#160; However, since it is only counting the occurrences of the Events defined in the Event Session and is not actually buffering the data for dispatch its impact is not generally a concern.<\/p>\n<h2>What\u2019s next?<\/h2>\n<p>Now that we have looked at the ring_buffer, asynchronous_file_target, bucketizers, and synchronous_file_target Targets, in the next post we\u2019ll look at the pair_matching Target, which can be used to match up related Events based on specific criteria to discard the matched pairs, leaving unmatched and potentially problematic Events for analysis.&#160; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday\u2019s post, Targets Week &#8211; Bucketizers, looked at the bucketizer Targets in Extended Events and how they can be used to simplify analysis and perform more targeted analysis based on their output.&#160; Today\u2019s post will be fairly short, by comparison to the previous posts, while we look at the synchronous_event_counter target, which can be used [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,38,45],"tags":[],"class_list":["post-556","post","type-post","status-publish","format-standard","hentry","category-extended-events","category-sql-server-2008","category-xevent-a-day-series"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>An XEvent a Day (8 of 31) - Targets Week - synchronous_event_counter - Jonathan Kehayias<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An XEvent a Day (8 of 31) - Targets Week - synchronous_event_counter - Jonathan Kehayias\" \/>\n<meta property=\"og:description\" content=\"Yesterday\u2019s post, Targets Week &#8211; Bucketizers, looked at the bucketizer Targets in Extended Events and how they can be used to simplify analysis and perform more targeted analysis based on their output.&#160; Today\u2019s post will be fairly short, by comparison to the previous posts, while we look at the synchronous_event_counter target, which can be used [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/\" \/>\n<meta property=\"og:site_name\" content=\"Jonathan Kehayias\" \/>\n<meta property=\"article:published_time\" content=\"2010-12-08T22:53:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T16:18:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png\" \/>\n<meta name=\"author\" content=\"Jonathan Kehayias\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan Kehayias\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/\"},\"author\":{\"name\":\"Jonathan Kehayias\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\"},\"headline\":\"An XEvent a Day (8 of 31) &#8211; Targets Week &#8211; synchronous_event_counter\",\"datePublished\":\"2010-12-08T22:53:00+00:00\",\"dateModified\":\"2017-04-13T16:18:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/\"},\"wordCount\":714,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday8of31targetsweeksynchronous_\\\/766790d7\\\/image_thumb.png\",\"articleSection\":[\"Extended Events\",\"SQL Server 2008\",\"XEvent a Day Series\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/\",\"url\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/\",\"name\":\"An XEvent a Day (8 of 31) - Targets Week - synchronous_event_counter - Jonathan Kehayias\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday8of31targetsweeksynchronous_\\\/766790d7\\\/image_thumb.png\",\"datePublished\":\"2010-12-08T22:53:00+00:00\",\"dateModified\":\"2017-04-13T16:18:35+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday8of31targetsweeksynchronous_\\\/766790d7\\\/image_thumb.png\",\"contentUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday8of31targetsweeksynchronous_\\\/766790d7\\\/image_thumb.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extended Events\",\"item\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/category\\\/extended-events\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"An XEvent a Day (8 of 31) &#8211; Targets Week &#8211; synchronous_event_counter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#website\",\"url\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/\",\"name\":\"Jonathan Kehayias - The Rambling DBA\",\"description\":\"The Rambling DBA\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\",\"name\":\"Jonathan Kehayias\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g\",\"caption\":\"Jonathan Kehayias\"},\"sameAs\":[\"http:\\\/\\\/3.209.169.194\\\/blogs\\\/jonathan\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"An XEvent a Day (8 of 31) - Targets Week - synchronous_event_counter - Jonathan Kehayias","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/","og_locale":"en_US","og_type":"article","og_title":"An XEvent a Day (8 of 31) - Targets Week - synchronous_event_counter - Jonathan Kehayias","og_description":"Yesterday\u2019s post, Targets Week &#8211; Bucketizers, looked at the bucketizer Targets in Extended Events and how they can be used to simplify analysis and perform more targeted analysis based on their output.&#160; Today\u2019s post will be fairly short, by comparison to the previous posts, while we look at the synchronous_event_counter target, which can be used [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/","og_site_name":"Jonathan Kehayias","article_published_time":"2010-12-08T22:53:00+00:00","article_modified_time":"2017-04-13T16:18:35+00:00","og_image":[{"url":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png","type":"","width":"","height":""}],"author":"Jonathan Kehayias","twitter_misc":{"Written by":"Jonathan Kehayias","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#article","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/"},"author":{"name":"Jonathan Kehayias","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c"},"headline":"An XEvent a Day (8 of 31) &#8211; Targets Week &#8211; synchronous_event_counter","datePublished":"2010-12-08T22:53:00+00:00","dateModified":"2017-04-13T16:18:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/"},"wordCount":714,"commentCount":1,"image":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#primaryimage"},"thumbnailUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png","articleSection":["Extended Events","SQL Server 2008","XEvent a Day Series"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/","url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/","name":"An XEvent a Day (8 of 31) - Targets Week - synchronous_event_counter - Jonathan Kehayias","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#primaryimage"},"thumbnailUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png","datePublished":"2010-12-08T22:53:00+00:00","dateModified":"2017-04-13T16:18:35+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#primaryimage","url":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png","contentUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday8of31targetsweeksynchronous_\/766790d7\/image_thumb.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/"},{"@type":"ListItem","position":2,"name":"Extended Events","item":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/category\/extended-events\/"},{"@type":"ListItem","position":3,"name":"An XEvent a Day (8 of 31) &#8211; Targets Week &#8211; synchronous_event_counter"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/","name":"Jonathan Kehayias - The Rambling DBA","description":"The Rambling DBA","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c","name":"Jonathan Kehayias","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/86630e27f5deecc5c393ea57fc7c3b6a068949f4fd6b5309f81de5a276f12855?s=96&d=mm&r=g","caption":"Jonathan Kehayias"},"sameAs":["http:\/\/3.209.169.194\/blogs\/jonathan"]}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts\/556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/comments?post=556"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts\/556\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/media?parent=556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/categories?post=556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/tags?post=556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}