<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqladvice.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Nibbling Deletes - Intro</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx</link><description>So, your application was a success. You're getting oodles and oodles of traffic. Only, it's building up faster than you had anticipated, and after a bit of calculation, you've determined that if the present trends persist, you'll have 24 TB of data within</description><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>re: Nibbling Deletes - Intro</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#12797</link><pubDate>Tue, 20 Sep 2005 20:16:08 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:12797</guid><dc:creator>Paul Ballew</dc:creator><description>The ROWCOUNT and WAITFOR DELAY seem to be the trick here.  With this approach, would you run the "nibble" constantly throughout the day, like every minute or every 10 minutes?  Is there a way to run it as a continuously-running job?

I'd be inclined to run it after hours and have it run until ROWCOUNT is 0.  Still using a TOP of course, so it's not selecting too much data at once, but re-running the procedure until 0 rows are deleted.</description></item><item><title>re: Nibbling Deletes - Intro</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#12798</link><pubDate>Tue, 20 Sep 2005 20:24:51 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:12798</guid><dc:creator>RepeatableRead</dc:creator><description>You can run these just about any time. 

I've usually scheduled them to run during the night, etc. But you could easily schedule them to run every hour, or whatever is needed. The beauty is that it will keep deleting, slowly but surely, until all of the rows are gone. So, however often you need it to run, you can. </description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#13718</link><pubDate>Fri, 11 Nov 2005 00:16:31 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:13718</guid><dc:creator>SimonS' SQL Server Stuff</dc:creator><description>Michael Campbell has blogged about removing data from a table in chunks &lt;a rel="nofollow" target="_new" href="http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx"&gt;http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx&lt;/a&gt;....</description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#14125</link><pubDate>Fri, 02 Dec 2005 20:35:04 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:14125</guid><dc:creator>simonsabin</dc:creator><description>A delete can now use TOP i.e.&lt;br&gt;DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;ORDER...</description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#14164</link><pubDate>Sun, 04 Dec 2005 21:20:48 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:14164</guid><dc:creator>Simon Sabin SQL Server Blog</dc:creator><description>A delete can now use TOP i.e.&lt;br&gt;DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;ORDER...</description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#15099</link><pubDate>Thu, 09 Feb 2006 00:51:09 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:15099</guid><dc:creator>SimonS</dc:creator><description>A delete can now use TOP i.e.&lt;br&gt;DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;ORDER...</description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#15101</link><pubDate>Thu, 09 Feb 2006 00:54:13 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:15101</guid><dc:creator>SimonS</dc:creator><description>A delete can now use TOP i.e.&lt;br&gt;DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;ORDER...</description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#17999</link><pubDate>Tue, 23 May 2006 09:17:09 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:17999</guid><dc:creator>SimonS' SQL Server Stuff</dc:creator><description>A delete can now use TOP i.e.&lt;br&gt;DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;ORDER...</description></item><item><title>Deleting/archiving data in SQL Server 2005</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#30153</link><pubDate>Sun, 03 Jun 2007 20:45:34 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:30153</guid><dc:creator>SimonS SQL Server Stuff</dc:creator><description>&lt;p&gt;A delete can now use TOP i.e. DELETE TOP (2000) FROM MyBigTableWHERE someCondition = true ORDER BY Dateolumn&lt;/p&gt;
</description></item><item><title>re: Nibbling Deletes - Intro</title><link>http://sqladvice.com/blogs/repeatableread/archive/2005/09/20/12795.aspx#34275</link><pubDate>Thu, 30 Aug 2007 16:29:09 GMT</pubDate><guid isPermaLink="false">81c49694-04ec-4285-ae1c-61808dc1a845:34275</guid><dc:creator>pencilstrike</dc:creator><description>&lt;p&gt;Hi Michael,&lt;/p&gt;
&lt;p&gt;Great article. &amp;nbsp;Any update on how to impose a rowcoutn on cascading deletes in SQL Server 2000? &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;
</description></item></channel></rss>