{"id":555,"date":"2010-12-09T22:59:00","date_gmt":"2010-12-09T22:59:00","guid":{"rendered":"\/blogs\/jonathan\/post\/An-XEvent-a-Day-(9-of-31)-Targets-Week-pair_matching.aspx"},"modified":"2017-04-13T12:17:48","modified_gmt":"2017-04-13T16:17:48","slug":"an-xevent-a-day-9-of-31-targets-week-pair_matching","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/","title":{"rendered":"An XEvent a Day (9 of 31) &#8211; Targets Week &#8211; pair_matching"},"content":{"rendered":"<p>Yesterday\u2019s post, <a href=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-8-of-31-targets-week-synchronous_event_counter\/\" target=\"_blank\">Targets Week \u2013 synchronous_event_counter<\/a>, looked at the counter Target in Extended Events and how it could be used to determine the number of Events a Event Session will generate without actually incurring the cost to collect and store the Events.&#160; Today\u2019s post is coming late, I know, but sometimes that\u2019s just how the ball rolls.&#160; My original planned demo\u2019s for today\u2019s post turned out to only work based on a fluke, though they were very consistent at working as expected, and as a result I had to rework a lot of this post this evening instead of letting it auto-post in the morning.&#160; Today&#8217;s post will cover the pair_matching Target, which can be used to find Events that didn\u2019t have a corresponding matching Event based on the Targets configuration. <\/p>\n<h2>What is the pair_matching Target?<\/h2>\n<p>The pair_matching Target works by matching a Begin Event with an End Event based on the specified match Columns and Actions, and drops the matched pairs of Events from the Target so that only unmatched Events remain.&#160;&#160; However, life would be grand if it was only that simple to use.&#160; The Books Online example <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/bb677357(v=SQL.110).aspx\">How to: Determine Which Queries Are Holding Locks<\/a>, uses the pair_matching Target with the sqlserver.lock_acquired and sqlserver.lock_released events for matching, to try and show how to find queries that haven\u2019t released their Locks.&#160; The problem is, there is not a 1:1 relationship between lock_acquired and lock_released Events.&#160; Lock escalation can kick in and multiple granular locks are acquired but the escalation to a less granular Lock only requires a single lock_released Event to fire.&#160; <\/p>\n<p>In the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/dd822788.aspx\" target=\"_blank\">Using SQL Server 2008 Extended Events<\/a> whitepaper I wrote, I showed how to track down orphaned transactions using the sqlserver.database_transaction_begin and sqlserver.database_transaction_end Events and matching on the sqlserver.session_id Action.&#160; The reason that this example works is that only one explicit transaction can be open for an session_id, even if you issue multiple BEGIN TRANSACTION commands, a single ROLLBACK undoes every operation performed since the first BEGIN TRANSACTION.&#160; Yes this is a tangent, but fear not, I am coming back to why this matters to the pair_matching Target.&#160; It matters to the pair_matching target because the begin and end Events must uniquely match each other in a manner that is 1:1 or the pair_matching Target is not going to work as you expect it to, as in the \u201cWhich Queries Are Holding Locks\u201d example in the BOL.<\/p>\n<p>Like the ring_buffer, bucketizer, and the synchronous_event_counter, the pair_matching 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 target are freed and any information contained in the target is lost. <\/p>\n<h2>Configuration Options<\/h2>\n<p>There are seven configuration options for the pair_matching Target, with two of them being mandatory.&#160; The pair_matching Target requires that the begin_event and end_event for matching be specified for the Target.&#160; In addition to specifying the events, it is also possible to restrict the match criteria by specifying an ordered comma separated list of column names for the begin_matching_columns and end_matching_columns configuration options.&#160; If the matching requires the use of Actions, an ordered comma separated list of Action names in the format of &lt;package_name.action_name&gt; can be specified for the begin_matching_actions and end_matching_actions configuration options.&#160; The final configuration option respond_to_memory_pressure determines whether or not the Target responds to memory pressure, and stops adding new orphaned events when there is memory pressure in the SQL Server.<\/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\">'pair_matching'<\/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\/anxeventaday9of31targetsweekpair_matchin\/1cf7b980\/image.png\"><img fetchpriority=\"high\" 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\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/image_thumb.png\" width=\"644\" height=\"100\" \/><\/a> <\/p>\n<h2>Understanding the Target Data Format<\/h2>\n<p>Like the other memory resident Targets, the pair_matching 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 pair_matching Target XML document, closely matches the output of the ring_buffer Target.&#160; The root node of the XML is the &lt;PairingTarget&gt; node which has attributes for the number of truncated Events, the count of the current number of orphans held in the Target, the number of matched Event pairs that have been made by the Target, and the number of orphans that have been dropped due to memory pressure in SQL Server.&#160; The &lt;PairingTarget&gt; node has child &lt;event&gt; nodes that match the XML document of the &lt;event&gt; nodes in the ring_buffer and asynchronous_file_target Targets.&#160; A simplified representation of the XML output by the pair_matching Target is below:<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">&lt;<\/span><span style=\"color: #a31515\">PairingTarget <\/span><span style=\"color: red\">truncated<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">orphanCount<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">matchedCount<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">memoryPressureDroppedCount<\/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\">package<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">id<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">version<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">timestamp<\/span><span style=\"color: blue\">=<\/span>&quot;&quot;<span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">data <\/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\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: blue\">\/&gt;\r\n      &lt;<\/span><span style=\"color: #a31515\">value <\/span><span style=\"color: blue\">\/&gt;\r\n      &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n    &lt;\/<\/span><span style=\"color: #a31515\">data<\/span><span style=\"color: blue\">&gt;\r\n    &lt;<\/span><span style=\"color: #a31515\">action <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;&quot;<span style=\"color: blue\">&gt;\r\n      &lt;<\/span><span style=\"color: #a31515\">type <\/span><span style=\"color: red\">name<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: red\">package<\/span><span style=\"color: blue\">=<\/span>&quot;&quot; <span style=\"color: blue\">\/&gt;\r\n      &lt;<\/span><span style=\"color: #a31515\">value <\/span><span style=\"color: blue\">\/&gt;\r\n      &lt;<\/span><span style=\"color: #a31515\">text <\/span><span style=\"color: blue\">\/&gt;\r\n    &lt;\/<\/span><span style=\"color: #a31515\">action<\/span><span style=\"color: blue\">&gt;\r\n  &lt;\/<\/span><span style=\"color: #a31515\">event<\/span><span style=\"color: blue\">&gt;\r\n&lt;\/<\/span><span style=\"color: #a31515\">PairingTarget<\/span><span style=\"color: blue\">&gt;<\/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<h2>Querying\/Parsing the Target Data<\/h2>\n<p>Like the other memory resident Targets in Extended Events, the pair_matching Target data is only exposed by querying the sys.dm_xe_session_targets DMV.&#160; Mike Wachal at Microsoft, traded emails with me, and dug into the source code for the pair_matching target yesterday trying to help me with some questions for this post, especially as they related to the legitimacy of the demo\u2019s being planned for this post.&#160; In the end Mike sent me a demo and permission to post it here in lieu of the questionable ones that I had been trading emails with him about.&#160; It is with much appreciation to Mike and the Extended Events Development team for their assistance with this blog post and the consistent back and forth with emails that they provided yesterday.<\/p>\n<p>Mike provided an example that I will show in its entirety for this weeks wrap up post on Saturday, but I am going to show a shorter sample of the demo to show how to use the pair_matching Target and query the Target data from it.&#160; When SQL Server executes a statements, generally the sqlserver.sql_statement_starting Event is fired when the statement begins executing and the sqlserver.sql_statement_completed Event is fired when the statement completes.&#160; However, when the client sets an execution time, also known as a CommandTimeout in .NET, if the execution duration exceeds that timeout, the statement never completes inside of SQL Server.&#160; I have run into problems with the default timeout of 30 seconds in .NET more times than I ever care to think about in my career.&#160; <\/p>\n<p>To demonstrate a execution time out using SQL Server Management Studio, you can open a New Query window, and in the connection dialog click on the Connection Properties tab and change the Execution time-out option from 0 (zero) to a positive integer value.&#160; For the purposes of this blog post example, I am going to use 5 seconds as the execution timeout for one query window that will generate the unmatched event.<\/p>\n<p><a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/7a537b04\/image.png\"><img decoding=\"async\" style=\"border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/18bdbbee\/image_thumb.png\" width=\"420\" height=\"491\" \/><\/a> <\/p>\n<p>The first thing we need to do is setup our Event Session to capture our Events and Actions, and configure our pair_matching Target.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: green\">-- Create the Event Session\r\n<\/span><span style=\"color: blue\">CREATE EVENT SESSION <\/span>FindAttentionEvents\r\n<span style=\"color: blue\">ON SERVER\r\nADD EVENT <\/span>sqlserver<span style=\"color: gray\">.<\/span>sql_statement_starting\r\n<span style=\"color: gray\">(    <\/span><span style=\"color: blue\">ACTION<\/span><span style=\"color: gray\">(<\/span>sqlserver<span style=\"color: gray\">.<\/span>session_id<span style=\"color: gray\">, <\/span>sqlserver<span style=\"color: gray\">.<\/span>tsql_stack<span style=\"color: gray\">)\r\n),\r\n<\/span><span style=\"color: blue\">ADD EVENT <\/span>sqlserver<span style=\"color: gray\">.<\/span>sql_statement_completed\r\n<span style=\"color: gray\">(    <\/span><span style=\"color: blue\">ACTION<\/span><span style=\"color: gray\">(<\/span>sqlserver<span style=\"color: gray\">.<\/span>session_id<span style=\"color: gray\">, <\/span>sqlserver<span style=\"color: gray\">.<\/span>tsql_stack<span style=\"color: gray\">)\r\n)\r\n<\/span><span style=\"color: blue\">ADD TARGET <\/span>package0<span style=\"color: gray\">.<\/span>pair_matching\r\n<span style=\"color: gray\">(    <\/span><span style=\"color: blue\">SET <\/span>begin_event <span style=\"color: gray\">= <\/span><span style=\"color: red\">'sqlserver.sql_statement_starting'<\/span><span style=\"color: gray\">,\r\n        <\/span>begin_matching_actions <span style=\"color: gray\">= <\/span><span style=\"color: red\">'sqlserver.session_id, sqlserver.tsql_stack'<\/span><span style=\"color: gray\">,\r\n        <\/span>end_event <span style=\"color: gray\">= <\/span><span style=\"color: red\">'sqlserver.sql_statement_completed'<\/span><span style=\"color: gray\">,\r\n        <\/span>end_matching_actions <span style=\"color: gray\">= <\/span><span style=\"color: red\">'sqlserver.session_id, sqlserver.tsql_stack'<\/span><span style=\"color: gray\">,\r\n        <\/span>respond_to_memory_pressure <span style=\"color: gray\">= <\/span>0\r\n<span style=\"color: gray\">)\r\n<\/span><span style=\"color: blue\">WITH <\/span><span style=\"color: gray\">(<\/span>MAX_DISPATCH_LATENCY<span style=\"color: gray\">=<\/span>5 SECONDS<span style=\"color: gray\">, <\/span>TRACK_CAUSALITY<span style=\"color: gray\">=<\/span><span style=\"color: blue\">ON<\/span><span style=\"color: gray\">)\r\n\r\n<\/span><span style=\"color: green\">-- Start the Event Session\r\n<\/span><span style=\"color: blue\">ALTER EVENT SESSION <\/span>FindAttentionEvents\r\n<span style=\"color: blue\">ON SERVER\r\nSTATE<\/span><span style=\"color: gray\">=<\/span>START\r\n<span style=\"color: blue\">GO<\/span><\/pre>\n<\/blockquote>\n<p><a href=\"http:\/\/www.11011.net\/software\/vspaste\"><\/a>Now in the New Query window that had the connection option for execution timeout set to 5 seconds, run the following commands:<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: blue\">SELECT TOP <\/span>100 <span style=\"color: gray\">*\r\n<\/span><span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">objects\r\n<\/span><span style=\"color: blue\">GO\r\n\r\nSELECT TOP <\/span>100 <span style=\"color: gray\">*\r\n<\/span><span style=\"color: blue\">FROM <\/span><span style=\"color: green\">sys<\/span><span style=\"color: gray\">.<\/span><span style=\"color: green\">columns\r\n<\/span><span style=\"color: blue\">GO\r\n\r\nWAITFOR DELAY <\/span><span style=\"color: red\">'00:00:10'\r\n<\/span><span style=\"color: blue\">GO\r\n<\/span><\/pre>\n<\/blockquote>\n<p>In my test system the output for this is:<\/p>\n<p><a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/65818284\/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\/anxeventaday9of31targetsweekpair_matchin\/2f9c8d6a\/image_thumb.png\" width=\"644\" height=\"112\" \/><\/a> <\/p>\n<p>If we flip back to a normal Query window and query the Target data, we will see multiple matched Events and one orphaned Event, for the above failure.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: green\">-- Create XML variable to hold Target Data\r\n<\/span><span style=\"color: blue\">DECLARE <\/span>@target_data <span style=\"color: blue\">XML\r\nSELECT <\/span>@target_data <span style=\"color: gray\">= \r\n    <\/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\">)\r\n<\/span><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\">'FindAttentionEvents'\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\">'pair_matching'\r\n\r\n<\/span><span style=\"color: green\">-- Query XML variable to get Target Execution information\r\n<\/span><span style=\"color: blue\">SELECT \r\n    <\/span>@target_data<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(PairingTarget\/@orphanCount)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>orphanCount<span style=\"color: gray\">,\r\n    <\/span>@target_data<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(PairingTarget\/@matchedCount)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>matchedCount<span style=\"color: gray\">,\r\n    <\/span>@target_data<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(PairingTarget\/@memoryPressureDroppedCount)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>memoryPressureDroppedCount\r\n\r\n<span style=\"color: green\">-- Query the XML variable to get the Target Data\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\">'(event\/@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>event_name<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@package)[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>package_name<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@id)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>id<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@version)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS version<\/span><span style=\"color: gray\">,\r\n    <\/span><span style=\"color: magenta\">DATEADD<\/span><span style=\"color: gray\">(<\/span>hh<span style=\"color: gray\">, \r\n            <\/span><span style=\"color: magenta\">DATEDIFF<\/span><span style=\"color: gray\">(<\/span>hh<span style=\"color: gray\">, <\/span><span style=\"color: magenta\">GETUTCDATE<\/span><span style=\"color: gray\">(), <\/span><span style=\"color: magenta\">CURRENT_TIMESTAMP<\/span><span style=\"color: gray\">), \r\n            <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/@timestamp)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'datetime2'<\/span><span style=\"color: gray\">)) <\/span><span style=\"color: blue\">AS <\/span>[timestamp]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;source_database_id&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[source_database_id]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;object_id&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[object_id]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;object_type&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'varchar(60)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[object_type]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;state&quot;]\/text)[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>[state]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;offset&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[offset]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;offset_end&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[offset_end]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/data[@name=&quot;nest_level&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>[nest_level]<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/action[@name=&quot;session_id&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'int'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>session_id<span style=\"color: gray\">,\r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/action[@name=&quot;tsql_stack&quot;]\/value)[1]'<\/span><span style=\"color: gray\">, <\/span><span style=\"color: red\">'varchar(max)'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>tsql_stack<span style=\"color: gray\">,    \r\n    <\/span>n<span style=\"color: gray\">.<\/span>value<span style=\"color: gray\">(<\/span><span style=\"color: red\">'(event\/action[@name=&quot;attach_activity_id&quot;]\/value)[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>activity_id    \r\n<span style=\"color: blue\">FROM\r\n<\/span><span style=\"color: gray\">(    <\/span><span style=\"color: blue\">SELECT <\/span>td<span style=\"color: gray\">.<\/span>query<span style=\"color: gray\">(<\/span><span style=\"color: red\">'.'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">as <\/span>n\r\n<span style=\"color: blue\">FROM <\/span>@target_data<span style=\"color: gray\">.<\/span>nodes<span style=\"color: gray\">(<\/span><span style=\"color: red\">'PairingTarget\/event'<\/span><span style=\"color: gray\">) <\/span><span style=\"color: blue\">AS <\/span>q<span style=\"color: gray\">(<\/span>td<span style=\"color: gray\">)\r\n) <\/span><span style=\"color: blue\">as <\/span>tab\r\n<span style=\"color: blue\">ORDER BY <\/span>session_id<span style=\"color: gray\">, <\/span>activity_id\r\n<span style=\"color: blue\">GO<\/span><\/pre>\n<\/blockquote>\n<p>If you pay close attention to the above XQuery of the Target data, you should catch that there is a difference between the above and previous examples.&#160; I have a prize for the first person that is not Adam Machanic (sorry dude, but you told me about it so that would be unfair) to comment with what that difference is and why it is important to take note of.&#160; The output of the above query on my test system after running the demo is:<\/p>\n<p><a href=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/3c966d7b\/image.png\"><img loading=\"lazy\" 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\/anxeventaday9of31targetsweekpair_matchin\/1483be5c\/image_thumb.png\" width=\"644\" height=\"76\" \/><\/a> <\/p>\n<p>Now with this Demo, it is important that you reset the environment that you tested it in if you followed the instructions and changed the execution timeout in SQL Server Management Studio.&#160; If you don\u2019t change it back, you will try and run a query that takes longer than 5 seconds and it will timeout on you.&#160; Also don\u2019t forget to cleanup the Event Session by dropping it from the catalog.<\/p>\n<blockquote>\n<pre class=\"code\"><span style=\"color: green\">-- Cleanup from the demonstration\r\n<\/span><span style=\"color: blue\">DROP EVENT SESSION <\/span>FindAttentionEvents \r\n<span style=\"color: blue\">ON SERVER<\/span><\/pre>\n<p>  <a href=\"http:\/\/www.11011.net\/software\/vspaste\"><\/a><\/p><\/blockquote>\n<h2>Considerations for Usage<\/h2>\n<p>The pair_matching Target can be a very useful tool in finding unmatched Events, but as previously pointed out in this blog post, you have to be very careful what you are providing for match criteria, and the Events have to have a 1:1 correlation for the begin_event and end_event or the target will produce incorrect results.<\/p>\n<h2>What\u2019s next?<\/h2>\n<p>Now that we have looked at the ring_buffer, asynchronous_file_target, bucketizers, synchronous_event_counter, and the pair_matching Targets, in the next post we\u2019ll look at the last Target available for use in Extended Events, the etw_classic_sync_target, which can be used to track Events firing in SQL Server out into the Windows OS Kernel and back into SQL Server to see end to end what occurred inside the Server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday\u2019s post, Targets Week \u2013 synchronous_event_counter, looked at the counter Target in Extended Events and how it could be used to determine the number of Events a Event Session will generate without actually incurring the cost to collect and store the Events.&#160; Today\u2019s post is coming late, I know, but sometimes that\u2019s just how the [&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-555","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.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>An XEvent a Day (9 of 31) - Targets Week - pair_matching - 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-9-of-31-targets-week-pair_matching\/\" \/>\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 (9 of 31) - Targets Week - pair_matching - Jonathan Kehayias\" \/>\n<meta property=\"og:description\" content=\"Yesterday\u2019s post, Targets Week \u2013 synchronous_event_counter, looked at the counter Target in Extended Events and how it could be used to determine the number of Events a Event Session will generate without actually incurring the cost to collect and store the Events.&#160; Today\u2019s post is coming late, I know, but sometimes that\u2019s just how the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/\" \/>\n<meta property=\"og:site_name\" content=\"Jonathan Kehayias\" \/>\n<meta property=\"article:published_time\" content=\"2010-12-09T22:59:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T16:17:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/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=\"11 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-9-of-31-targets-week-pair_matching\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/\"},\"author\":{\"name\":\"Jonathan Kehayias\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#\\\/schema\\\/person\\\/01c10d94f3648654ef706d5e6305f69c\"},\"headline\":\"An XEvent a Day (9 of 31) &#8211; Targets Week &#8211; pair_matching\",\"datePublished\":\"2010-12-09T22:59:00+00:00\",\"dateModified\":\"2017-04-13T16:17:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/\"},\"wordCount\":1537,\"commentCount\":8,\"image\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday9of31targetsweekpair_matchin\\\/1493e429\\\/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-9-of-31-targets-week-pair_matching\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/\",\"url\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/\",\"name\":\"An XEvent a Day (9 of 31) - Targets Week - pair_matching - Jonathan Kehayias\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday9of31targetsweekpair_matchin\\\/1493e429\\\/image_thumb.png\",\"datePublished\":\"2010-12-09T22:59:00+00:00\",\"dateModified\":\"2017-04-13T16:17:48+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-9-of-31-targets-week-pair_matching\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday9of31targetsweekpair_matchin\\\/1493e429\\\/image_thumb.png\",\"contentUrl\":\"https:\\\/\\\/www.SQLskills.com\\\/blogs\\\/jonathan\\\/wp-content\\\/uploads\\\/windowslivewriter\\\/anxeventaday9of31targetsweekpair_matchin\\\/1493e429\\\/image_thumb.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlskills.com\\\/blogs\\\/jonathan\\\/an-xevent-a-day-9-of-31-targets-week-pair_matching\\\/#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 (9 of 31) &#8211; Targets Week &#8211; pair_matching\"}]},{\"@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 (9 of 31) - Targets Week - pair_matching - 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-9-of-31-targets-week-pair_matching\/","og_locale":"en_US","og_type":"article","og_title":"An XEvent a Day (9 of 31) - Targets Week - pair_matching - Jonathan Kehayias","og_description":"Yesterday\u2019s post, Targets Week \u2013 synchronous_event_counter, looked at the counter Target in Extended Events and how it could be used to determine the number of Events a Event Session will generate without actually incurring the cost to collect and store the Events.&#160; Today\u2019s post is coming late, I know, but sometimes that\u2019s just how the [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/","og_site_name":"Jonathan Kehayias","article_published_time":"2010-12-09T22:59:00+00:00","article_modified_time":"2017-04-13T16:17:48+00:00","og_image":[{"url":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/image_thumb.png","type":"","width":"","height":""}],"author":"Jonathan Kehayias","twitter_misc":{"Written by":"Jonathan Kehayias","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/#article","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/"},"author":{"name":"Jonathan Kehayias","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#\/schema\/person\/01c10d94f3648654ef706d5e6305f69c"},"headline":"An XEvent a Day (9 of 31) &#8211; Targets Week &#8211; pair_matching","datePublished":"2010-12-09T22:59:00+00:00","dateModified":"2017-04-13T16:17:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/"},"wordCount":1537,"commentCount":8,"image":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/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-9-of-31-targets-week-pair_matching\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/","url":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/","name":"An XEvent a Day (9 of 31) - Targets Week - pair_matching - Jonathan Kehayias","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/image_thumb.png","datePublished":"2010-12-09T22:59:00+00:00","dateModified":"2017-04-13T16:17:48+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-9-of-31-targets-week-pair_matching\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/#primaryimage","url":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/image_thumb.png","contentUrl":"https:\/\/www.SQLskills.com\/blogs\/jonathan\/wp-content\/uploads\/windowslivewriter\/anxeventaday9of31targetsweekpair_matchin\/1493e429\/image_thumb.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/an-xevent-a-day-9-of-31-targets-week-pair_matching\/#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 (9 of 31) &#8211; Targets Week &#8211; pair_matching"}]},{"@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\/555","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=555"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/posts\/555\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/media?parent=555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/categories?post=555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/jonathan\/wp-json\/wp\/v2\/tags?post=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}