<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Spam Filter ISP Forums : Database Performance Problems</title>
  <link>https://www.logsat.com/spamfilter/forums/</link>
  <description><![CDATA[This is an XML content feed of; Spam Filter ISP Forums : Spam Filter ISP Support : Database Performance Problems]]></description>
  <pubDate>Thu, 13 Aug 2026 05:13:43 +0000</pubDate>
  <lastBuildDate>Fri, 19 Feb 2010 12:10:24 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.logsat.com/spamfilter/forums/RSS_post_feed.asp?TID=6745</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Spam Filter ISP Forums]]></title>
   <url>https://www.logsat.com/spamfilter/forums/forum_images/web_wiz_forums.png</url>
   <link>https://www.logsat.com/spamfilter/forums/</link>
  </image>
  <item>
   <title><![CDATA[Database Performance Problems :  Thanks! However, I did need...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13453&amp;title=database-performance-problems#13453</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=904">gillonba</a><br /><strong>Subject:</strong> 6745<br /><strong>Posted:</strong> 19 February 2010 at 12:10pm<br /><br /><span Apple-style-span="Apple-style-span" style="font-family: Verdana, Helvetica, Arial; line-height: normal; font-size: medium; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; "><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div><span Apple-style-span="Apple-style-span" style="font-family: Verdana, Helvetica, Arial; line-height: normal; font-size: medium; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; "><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks! &nbsp;However, I did need to make one correction (highlighted):&nbsp;</font></span></font></span></div><div><span Apple-style-span="Apple-style-span" style="font-family: Verdana, Helvetica, Arial; line-height: normal; font-size: medium; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; "><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></font></span></font></span></div><div><span Apple-style-span="Apple-style-span" style="font-family: Verdana, Helvetica, Arial; line-height: normal; font-size: medium; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; "><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></font></span></font></span></div>UPDATE</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;tblQuarantine&nbsp;</font><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">SET</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;Expire&nbsp;</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">=</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;1&nbsp;</font><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">WHERE</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(</font><font color="#FF00FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">DATEDIFF</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(</font><font color="#FF00FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">day</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">,</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;MsgDate</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">,</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;</font><font color="#FF00FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">GETDATE</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">())</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&gt;</font><font style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font Apple-style-span="Apple-style-span" color="#00007F">&nbsp;14</font></font></span></font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; ">) <span ="Apple-style-span" style="font-size: medium;"><font ="Apple-style-span" color="#FF3300">AND </font></span><b><span ="Apple-style-span" style="font-size: medium;"><font ="Apple-style-span" color="#FF3300">Expire = 0</font></span></b><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></span></font></font><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; "><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">IF</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;</font><font color="#FF00FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">@@ROWCOUNT</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;</font><font color="#7F7F7F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&gt;</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;0&nbsp;</font><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">GOTO</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;delete_more1<br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></font><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">SET</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;</font><font color="#0000FF" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ROWCOUNT</font><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&nbsp;0</font></span></font></span><div><span Apple-style-span="Apple-style-span" style="font-family: Verdana, Helvetica, Arial; line-height: normal; font-size: medium; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><font size="1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 7pt; "><font color="#00007F" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></font></span></font></span></div><div><font ="Apple-style-span" color="#00007F" face="Verdana, Helvetica, Arial" size="1"><span ="Apple-style-span" style="font-size: 9px; line-height: normal; -webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br></span></font></div>]]>
   </description>
   <pubDate>Fri, 19 Feb 2010 12:10:24 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13453&amp;title=database-performance-problems#13453</guid>
  </item> 
  <item>
   <title><![CDATA[Database Performance Problems : If you configure the the &amp;#034;he...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13181&amp;title=database-performance-problems#13181</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=8">LogSat</a><br /><strong>Subject:</strong> 6745<br /><strong>Posted:</strong> 09 September 2009 at 11:09pm<br /><br />If you configure the the "<span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">he number of days to store quarantined rejected emails</span>" to zero, that will disable the archiving of spam emails and thus the quarantine database will be indeed disabled. This will also disable the scheduled process that removes old entries form the database.]]>
   </description>
   <pubDate>Wed, 09 Sep 2009 23:09:53 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13181&amp;title=database-performance-problems#13181</guid>
  </item> 
  <item>
   <title><![CDATA[Database Performance Problems : When I set the Database options...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13180&amp;title=database-performance-problems#13180</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=812">bdaniels</a><br /><strong>Subject:</strong> 6745<br /><strong>Posted:</strong> 09 September 2009 at 8:05pm<br /><br />When I set the Database options <DIV>&nbsp;</DIV><DIV>"Enter the number of days to store quarantined rejected emails = 0 </DIV><DIV>&nbsp;</DIV><DIV>It changes the text to </DIV><DIV>&nbsp;</DIV><DIV>"The Qurantine DB is not Active"</DIV><DIV>&nbsp;</DIV><DIV>is this normal behavior?</DIV><DIV>&nbsp;</DIV><DIV>Also, do I need to set </DIV><DIV>Enter the interval in minutes for when the expired emails are deleted from the quarantine to = 0 also?</DIV>]]>
   </description>
   <pubDate>Wed, 09 Sep 2009 20:05:40 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13180&amp;title=database-performance-problems#13180</guid>
  </item> 
  <item>
   <title><![CDATA[Database Performance Problems :  bdaniels,The query is initiated...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13167&amp;title=database-performance-problems#13167</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=8">LogSat</a><br /><strong>Subject:</strong> 6745<br /><strong>Posted:</strong> 04 September 2009 at 7:20pm<br /><br />bdaniels,<div><br></div><div>The query is initiated by SpamFilter, and it runs by default every 60 minutes. The query will delete messages that are older than x number of days, and it will also perform, as you correctly noticed, cleanup by looking for orphaned entries in the tblMsgs that do not have corresponding entries in the tblQuarantine.</div><div><br></div><div><span Apple-style-span="Apple-style-span" style="font-family: Verdana; font-size: medium; line-height: normal; "><div><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt; "><font Apple-style-span="Apple-style-span" face="'Lucida Grande'" size="3"><span Apple-style-span="Apple-style-span" style="font-size: 12px; ">for high traffic sites (500,000+ emails/day, and/or quarantine databases of 10GB or higher), we often recommend to use a scheduled job within MS SQL to perform the purge. This is rather more efficient and reliable than having SpamFilter perform that task. It may be worth a try to see if it helps solving the problem.<br><br>If you create the following stored procedure within the SpamFilter database (you can do so by simply executing the query below), you can then very easily schedule it with the SQL Server Agent scheduler to run hourly:</span></font><br><br></span></font></font><font color="#0000FF"><font size="1"><font face="Verdana, Helvetica, Arial"><span style="font-size: 7pt; ">CREATE</span></font></font></font><font size="1"><font face="Verdana, Helvetica, Arial"><span style="font-size: 7pt; ">&nbsp;<font color="#0000FF">PROCEDURE</font>&nbsp;PurgeQuarantine&nbsp;<br><font color="#0000FF">AS<br>BEGIN<br></font><font color="#007F00">-- SET NOCOUNT ON added to prevent extra result sets from<br>-- interfering with SELECT statements.<br>-- SET NOCOUNT ON;<br></font></span></font></font><font face="Verdana, Helvetica, Arial"><font color="#00007F"><font size="4"><span style="font-size: 11pt; "><br></span></font></font><font color="#0000FF"><font size="1"><span style="font-size: 7pt; ">SET</span></font></font><font size="1"><span style="font-size: 7pt; "><font color="#00007F">&nbsp;</font><font color="#0000FF">ROWCOUNT</font><font color="#00007F">&nbsp;500<br>delete_more1</font><font color="#7F7F7F">:<br></font><font color="#0000FF">UPDATE</font><font color="#00007F">&nbsp;tblQuarantine&nbsp;</font><font color="#0000FF">SET</font><font color="#00007F">&nbsp;Expire&nbsp;</font><font color="#7F7F7F">=</font><font color="#00007F">&nbsp;1&nbsp;</font><font color="#0000FF">WHERE</font><font color="#00007F">&nbsp;</font><font color="#7F7F7F">(</font><font color="#FF00FF">DATEDIFF</font><font color="#7F7F7F">(</font><font color="#FF00FF">day</font><font color="#7F7F7F">,</font><font color="#00007F">&nbsp;MsgDate</font><font color="#7F7F7F">,</font><font color="#00007F">&nbsp;</font><font color="#FF00FF">GETDATE</font><font color="#7F7F7F">())</font><font color="#00007F">&nbsp;</font><font color="#7F7F7F">&gt;</font><font color="#00007F">&nbsp;</font></span></font><font color="#FF0000"><font size="6"><span style="font-size: 16pt; "><u>14</u></span></font></font><font color="#7F7F7F"><font size="1"><span style="font-size: 7pt; ">)&nbsp;<span ="Apple-style-span" style="color: rgb0, 0, 0; "><font color="#0000FF">AND</font><font color="#00007F">&nbsp;Expire&nbsp;</font><font color="#7F7F7F">=</font><font color="#00007F">&nbsp;0&nbsp;</font></span><br></span></font></font><font size="1"><span style="font-size: 7pt; "><font color="#0000FF">IF</font><font color="#00007F">&nbsp;</font><font color="#FF00FF">@@ROWCOUNT</font><font color="#00007F">&nbsp;</font><font color="#7F7F7F">&gt;</font><font color="#00007F">&nbsp;0&nbsp;</font><font color="#0000FF">GOTO</font><font color="#00007F">&nbsp;delete_more1<br></font><font color="#0000FF">SET</font><font color="#00007F">&nbsp;</font><font color="#0000FF">ROWCOUNT</font><font color="#00007F">&nbsp;0<br></font></span></font><font color="#00007F"><font size="4"><span style="font-size: 11pt; "><br></span></font></font><font color="#0000FF"><font size="1"><span style="font-size: 7pt; ">SET</span></font></font><font size="1"><span style="font-size: 7pt; "><font color="#00007F">&nbsp;</font><font color="#0000FF">ROWCOUNT</font><font color="#00007F">&nbsp;500<br>delete_more2</font><font color="#7F7F7F">:<br></font><font color="#0000FF">DELETE</font><font color="#00007F">&nbsp;</font><font color="#0000FF">FROM</font><font color="#00007F">&nbsp;tblQuarantine&nbsp;</font><font color="#0000FF">WHERE</font><font color="#00007F">&nbsp;tblQuarantine</font><font color="#7F7F7F">.</font><font color="#00007F">Expire&nbsp;</font><font color="#7F7F7F">&lt;&gt;</font><font color="#00007F">&nbsp;0<br></font><font color="#0000FF">IF</font><font color="#00007F">&nbsp;</font><font color="#FF00FF">@@ROWCOUNT</font><font color="#00007F">&nbsp;</font><font color="#7F7F7F">&gt;</font><font color="#00007F">&nbsp;0&nbsp;</font><font color="#0000FF">GOTO</font><font color="#00007F">&nbsp;delete_more2<br></font><font color="#0000FF">SET</font><font color="#00007F">&nbsp;</font><font color="#0000FF">ROWCOUNT</font><font color="#00007F">&nbsp;0<br></font></span></font><font color="#00007F"><font size="4"><span style="font-size: 11pt; "><br></span></font></font><font color="#0000FF"><font size="1"><span style="font-size: 7pt; ">SET</span></font></font><font size="1"><span style="font-size: 7pt; "><b><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">ROWCOUNT</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;500<br>delete_more3</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">:<br></span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">DELETE</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;tblMsgs&nbsp;</span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">FROM</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;tblMsgs&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">LEFT</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">JOIN</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;tblQuarantine&nbsp;<br></span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">ON</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;tblMsgs</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">.</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">MsgID&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">=</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;tblQuarantine</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">.</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">MsgID&nbsp;</span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">WHERE</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">(</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">tblQuarantine</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">.</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">MsgID&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">IS</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">NULL)<br></span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">IF</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#FF00FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">@@ROWCOUNT</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#7F7F7F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&gt;</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;0&nbsp;</span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">GOTO</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;delete_more3<br></span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">SET</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;</span></font><font color="#0000FF"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">ROWCOUNT</span></font><font color="#00007F"><span Apple-style-span="Apple-style-span" style="font-weight: normal; ">&nbsp;0</span><br></font></b></span></font><font color="#00007F"><font size="4"><span style="font-size: 11pt; "><br></span></font></font><font color="#0000FF"><font size="1"><span style="font-size: 7pt; ">END<br></span></font></font><font size="1"><span style="font-size: 7pt; "><font color="#00007F">GO<br></font></span></font></font><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt; "><br></span></font></font></div><div><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt; "><br>The only parameter you may want to change is that big red 14 that specifies the number of days to hold the emails. The stored procedure use loops to update/delete 500 rows of data at a time, and this avoids extensive table/row locking to increase performance and reduce database timeouts.</span></font></font></div><div><font Apple-style-span="Apple-style-span" face="Calibri, Verdana, Helvetica, Arial" size="4"><span Apple-style-span="Apple-style-span" style="font-size: 15px; "><br></span></font></div><div><font Apple-style-span="Apple-style-span" face="Calibri, Verdana, Helvetica, Arial" size="4"><span Apple-style-span="Apple-style-span" style="font-size: 15px; ">Once this is done, you'll want to prevent SpamFilter from performing the cleanup task as well. This is done by setting to "0" the value for "<font Apple-style-span="Apple-style-span" face="Calibri" size="3"><span Apple-style-span="Apple-style-span" style="font-size: 13px; "><i><font Apple-style-span="Apple-style-span" color="#4C4C4C">Enter the interval in minutes for when the expired emails are deleted from the quarantine database</font></i></span></font>". This is found under the "Settings - Database Setup" tab in SpamFilter.</span></font></div><div><font Apple-style-span="Apple-style-span" face="Calibri, Verdana, Helvetica, Arial" size="4"><span Apple-style-span="Apple-style-span" style="font-size: 15px;"><br></span></font></div></span></div><span style="font-size:10px"><br /><br />Edited by LogSat - 27 December 2010 at 11:09pm</span>]]>
   </description>
   <pubDate>Fri, 04 Sep 2009 19:20:53 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13167&amp;title=database-performance-problems#13167</guid>
  </item> 
  <item>
   <title><![CDATA[Database Performance Problems : I recently noticed the database...]]></title>
   <link>https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13166&amp;title=database-performance-problems#13166</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.logsat.com/spamfilter/forums/member_profile.asp?PF=812">bdaniels</a><br /><strong>Subject:</strong> 6745<br /><strong>Posted:</strong> 04 September 2009 at 12:58pm<br /><br />I recently noticed the database slowing down on the SQL server that is running the Quarantine.&nbsp;&nbsp; After some troubleshooting.&nbsp;&nbsp; I found the process that performs the following query causing blocking in the tables.<DIV>&nbsp;</DIV><DIV>delete tblmsgs from tblmsgs left join tblquarantine on tblmsgs.msgid = tblquarantine.msgid where (tblquarantine.msgid is null);</DIV><DIV>&nbsp;</DIV><DIV>This task would run for about 40 minutes, then stop, then about 15 minutes later it would run again with the same results.</DIV><DIV>&nbsp;</DIV><DIV>I ran the following query which returned about 2.5 million results.</DIV><DIV><BR>select count(*) from tblmsgs left join tblquarantine on tblmsgs.msgid = tblquarantine.msgid <BR>where (tblquarantine.msgid is null);</DIV><DIV>&nbsp;</DIV><DIV>It appears this task is supposed to clean the database by deleting actual messages that do not have a corresponding tblquarantine entry.&nbsp;&nbsp; However, with 2.5 million messages in the table it appears that is has not been running properly.</DIV><DIV>&nbsp;</DIV><DIV>So a few questions.&nbsp;&nbsp; </DIV><OL><LI>What is actually kicking off this process.&nbsp;&nbsp; Is the SPAM server, or is it a SQL job somewhere</LI><LI>Is there way to set it to not lock the tbmsgs table so that it does not block other tasks.</LI><LI>Why would the task be running, but not actually deleting the messages.&nbsp; Is it possible that there are too many messages for it to handle and it is erroring out.</LI><LI>Is there an issue with running the following statement so that I can accomplish what the job is trying to do manually in smaller increments of 25000.&nbsp; </LI></OL><DIV>select top 25000 tblmsgs.msgid FROM tblmsgs<BR>left join tblquarantine on tblmsgs.msgid = tblquarantine.msgid <BR>where (tblquarantine.msgid is null)<BR>and tblmsgs.msgid not in (select msgid from tblquarantine)<BR>order by tblmsgs.msgid</DIV><DIV>&nbsp;</DIV><DIV>delete tblmsgs from tblmsgs left join tblquarantine on tblmsgs.msgid = tblquarantine.msgid <BR>where (tblquarantine.msgid is null)<BR>and tblmsgs.msgid &lt; 30585604</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 04 Sep 2009 12:58:32 +0000</pubDate>
   <guid isPermaLink="true">https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=6745&amp;PID=13166&amp;title=database-performance-problems#13166</guid>
  </item> 
 </channel>
</rss>