title: Atempt delete rows in oracle database older than 1 hour causing timeouts
body: <p>I have strange problem that I can't fix.</p>
  
  <p>I'm trying to delete all rows that them timestamp is older than 1 hour.</p>
  
  <p>SQL :</p>
  
  <pre><code>DELETE  FROM TABLE WHERE TIMESTAMP &lt;= SYSTIMESTAMP - 1/24
  </code></pre>
  
  <p>Whole code work perfect in SQL Developer but when i try do same in iBatis.net i got timeouts.</p>
  
  <pre><code>  &lt;statements&gt;
      &lt;delete id="DeleteRows" parameterClass="int"&gt;
        &lt;![CDATA[
        DELETE  FROM TABLE WHERE TIMESTAMP &lt;= SYSTIMESTAMP - #VALUE#/24
  &lt;!--THIS DON'T WORK--&gt;
        ]]&gt;
      &lt;/delete&gt;
    &lt;/statements&gt;
  </code></pre>
  
  <p>Another strange thing is that problem don't exist when i hange less-than operator to 'equal-to'
  e.g</p>
  
  <pre><code>  &lt;statements&gt;
      &lt;delete id="DeleteRows" parameterClass="int"&gt;
        &lt;![CDATA[
        DELETE  FROM TABLE WHERE TIMESTAMP = SYSTIMESTAMP - #VALUE#/24
  &lt;!--THIS WORK--&gt;
        ]]&gt;
      &lt;/delete&gt;
    &lt;/statements&gt;
  </code></pre>
  
  <p>Timeouts i gen only with Les-than and grater-than operators and only in iBatis.net. Does any body know why ? </p>
  
  <p>Funny fact. When i query <code>DELETE  FROM TABLE WHERE TIMESTAMP &lt; '07-AUG-11'</code> it work. Also when i try to query <code>DELETE  FROM TABLE WHERE TIMESTAMP BETWEEN '07-AUG-11' AND SYSTIMESTAMP</code> it works too. It seems to be problem ony with <code>&lt;</code> and <code>&gt;</code> combine with <code>SYSTIMESTAMP</code>
  Is there other way to delete rows older than one hour without using those operators ?
  Thanks</p>