<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Time Out Due to Executing DELETE on Large RecordSet</title>
	<atom:link href="http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #012 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-409568</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #012 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 19 Jan 2013 01:30:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-409568</guid>
		<description><![CDATA[[...] Time Out Due to Executing DELETE on Large RecordSet There are many differences between truncate and delete but I have seen people using them interchangeably without thinking much. In this blog post, the difference is explained with the help of other similar articles. It is not a good idea to use TRUNCATE right away if you DELETE is timing out. The best practice should be to understand the difference. It is also a good idea to delete the data in smaller batch instead of larger batch. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Time Out Due to Executing DELETE on Large RecordSet There are many differences between truncate and delete but I have seen people using them interchangeably without thinking much. In this blog post, the difference is explained with the help of other similar articles. It is not a good idea to use TRUNCATE right away if you DELETE is timing out. The best practice should be to understand the difference. It is also a good idea to delete the data in smaller batch instead of larger batch. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim P.</title>
		<link>http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-283919</link>
		<dc:creator><![CDATA[Jim P.]]></dc:creator>
		<pubDate>Fri, 11 May 2012 16:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-283919</guid>
		<description><![CDATA[&gt;&gt; Also TRUNCATE is not so useful when you are deleting “conditionally&quot;

I do it as a while loop -- something like this

while (select count(1) from mytable where indexnum  0
begin
  delete top (5000)  from mytable where indexnum &lt; 100000
end

That loops through and takes out in chunks. It will grow your tran log, but it shouldn&#039;t be as bad, and you don&#039;t face a time out issue.]]></description>
		<content:encoded><![CDATA[<p>&gt;&gt; Also TRUNCATE is not so useful when you are deleting “conditionally&#8221;</p>
<p>I do it as a while loop &#8212; something like this</p>
<p>while (select count(1) from mytable where indexnum  0<br />
begin<br />
  delete top (5000)  from mytable where indexnum &lt; 100000<br />
end</p>
<p>That loops through and takes out in chunks. It will grow your tran log, but it shouldn&#039;t be as bad, and you don&#039;t face a time out issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naren</title>
		<link>http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-80498</link>
		<dc:creator><![CDATA[naren]]></dc:creator>
		<pubDate>Fri, 16 Jul 2010 10:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-80498</guid>
		<description><![CDATA[Hi Pinal,

When i am tryign to use the dbcc 

DBCC CHECKIDENT (Schools.tblCaste,reseed,1)


Msg 102, Level 15, State 1, Line 1
Incorrect syntax near &#039;.&#039;.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>When i am tryign to use the dbcc </p>
<p>DBCC CHECKIDENT (Schools.tblCaste,reseed,1)</p>
<p>Msg 102, Level 15, State 1, Line 1<br />
Incorrect syntax near &#8216;.&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R Chella Ganesh</title>
		<link>http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-33049</link>
		<dc:creator><![CDATA[R Chella Ganesh]]></dc:creator>
		<pubDate>Thu, 17 Jan 2008 12:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-33049</guid>
		<description><![CDATA[Hi Pinal,

When trying to delete 1 M records in a single stretch, Will try to write to the logfile for deletion of all 1 Million records., and then the actual deletion starts. if you try, deleting the records in smaller batch of say 500 records per time, May speed up the process.

This is my opinion. Please correct me if i am wrong.

Regards
Chella Ganesh
C/o Excel Soft Technologies P Ltd.
Mysore
India]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>When trying to delete 1 M records in a single stretch, Will try to write to the logfile for deletion of all 1 Million records., and then the actual deletion starts. if you try, deleting the records in smaller batch of say 500 records per time, May speed up the process.</p>
<p>This is my opinion. Please correct me if i am wrong.</p>
<p>Regards<br />
Chella Ganesh<br />
C/o Excel Soft Technologies P Ltd.<br />
Mysore<br />
India</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Hung</title>
		<link>http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-32931</link>
		<dc:creator><![CDATA[Jerry Hung]]></dc:creator>
		<pubDate>Wed, 16 Jan 2008 18:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2008/01/14/sql-server-time-out-due-to-executing-delete-on-large-recordset/#comment-32931</guid>
		<description><![CDATA[Also TRUNCATE is not so useful when you are deleting &quot;conditionally&quot;
e.g. delete 1M rows, in a table with 3M rows

In this case
- watch for index buildup (maybe drop-and-create index after delete)
- watch for log buildup (maybe switch to SIMPLE, then back to FULL recovery)
- do it in smaller batches]]></description>
		<content:encoded><![CDATA[<p>Also TRUNCATE is not so useful when you are deleting &#8220;conditionally&#8221;<br />
e.g. delete 1M rows, in a table with 3M rows</p>
<p>In this case<br />
- watch for index buildup (maybe drop-and-create index after delete)<br />
- watch for log buildup (maybe switch to SIMPLE, then back to FULL recovery)<br />
- do it in smaller batches</p>
]]></content:encoded>
	</item>
</channel>
</rss>
