<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Waiting, waiting…	</title>
	<atom:link href="https://lobsterpot.com.au/blog/2013/12/10/waiting-waiting/feed/" rel="self" type="application/rss+xml" />
	<link>https://lobsterpot.com.au/blog/2013/12/10/waiting-waiting/</link>
	<description></description>
	<lastBuildDate>Mon, 27 Jan 2014 12:49:28 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>
		By: Rob Farley		</title>
		<link>https://lobsterpot.com.au/blog/2013/12/10/waiting-waiting/#comment-2398</link>

		<dc:creator><![CDATA[Rob Farley]]></dc:creator>
		<pubDate>Mon, 27 Jan 2014 12:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3304#comment-2398</guid>

					<description><![CDATA[Sorry - forgot to get back to this after Christmas.
Use this code to avoid using 2012 features:
with numbered as (
 &#160; &#160;select *, row_number() over (partition by wait_type order by snapshot_time desc) as rownum 
 &#160; &#160;from monitoring.waits
)
select &#160;w1.wait_type, w2.snapshot_time, 
 &#160; &#160; &#160; &#160;w1.waiting_tasks_count - w2.waiting_tasks_count as diff_wait_count,
 &#160; &#160; &#160; &#160;w1.wait_time_ms - w2.wait_time_ms as diff_wait_time,
 &#160; &#160; &#160; &#160;1000 * datediff(second, w2.snapshot_time, w1.snapshot_time) as diff_ms
from numbered w1 
join numbered w2 on w2.wait_type = w1.wait_type
where w1.rownum = 1 and w2.rownum = 2
order by diff_wait_time desc, wait_type;]]></description>
			<content:encoded><![CDATA[<p>Sorry &#8211; forgot to get back to this after Christmas.<br />
Use this code to avoid using 2012 features:<br />
with numbered as (<br />
 &nbsp; &nbsp;select *, row_number() over (partition by wait_type order by snapshot_time desc) as rownum<br />
 &nbsp; &nbsp;from monitoring.waits<br />
)<br />
select &nbsp;w1.wait_type, w2.snapshot_time,<br />
 &nbsp; &nbsp; &nbsp; &nbsp;w1.waiting_tasks_count &#8211; w2.waiting_tasks_count as diff_wait_count,<br />
 &nbsp; &nbsp; &nbsp; &nbsp;w1.wait_time_ms &#8211; w2.wait_time_ms as diff_wait_time,<br />
 &nbsp; &nbsp; &nbsp; &nbsp;1000 * datediff(second, w2.snapshot_time, w1.snapshot_time) as diff_ms<br />
from numbered w1<br />
join numbered w2 on w2.wait_type = w1.wait_type<br />
where w1.rownum = 1 and w2.rownum = 2<br />
order by diff_wait_time desc, wait_type;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: murali		</title>
		<link>https://lobsterpot.com.au/blog/2013/12/10/waiting-waiting/#comment-2397</link>

		<dc:creator><![CDATA[murali]]></dc:creator>
		<pubDate>Mon, 23 Dec 2013 18:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3304#comment-2397</guid>

					<description><![CDATA[Hey Rob, 
Thanks for the code, do you mind helping the same with SQL SERVER 2008 or 2008 R2. As We donot have LEAD or LAG functions. 
Thanks in advance.
Regards
Murali]]></description>
			<content:encoded><![CDATA[<p>Hey Rob,<br />
Thanks for the code, do you mind helping the same with SQL SERVER 2008 or 2008 R2. As We donot have LEAD or LAG functions.<br />
Thanks in advance.<br />
Regards<br />
Murali</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Robert L Davis		</title>
		<link>https://lobsterpot.com.au/blog/2013/12/10/waiting-waiting/#comment-2396</link>

		<dc:creator><![CDATA[Robert L Davis]]></dc:creator>
		<pubDate>Sat, 14 Dec 2013 00:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.lobsterpot.com.au/?p=3304#comment-2396</guid>

					<description><![CDATA[Thanks for participating in T-SQL Tuesday #49!]]></description>
			<content:encoded><![CDATA[<p>Thanks for participating in T-SQL Tuesday #49!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
