title: SQL Server table with 1.2 million rows and 400+ columns very slow even on simple count(*)
body: <p>I use SQL Server 2008 R2 and have a table copied from a DB2 table. I'm aware that the amount of rows is not normal, but this is historical and I can't do anything about that at the moment.</p>
  
  <p>But a simple count of rows takes more than 2 minutes. The table consists of 3 columns with indexed customer ids then rest is fields with decimal numbers.</p>
  
  <p>A search like this:</p>
  
  <pre><code>select 
      AD_ARBNUM, AD_SHBETSA, AD_AMBIDSHBETSA,AD_ASKATSHBETSA
  from 
      lmoko 
  where 
      AD_SHBETSA + AD_AMBIDSHBETSA + AD_ASKATSHBETSA &lt; 0
  </code></pre>
  
  <p>where <code>AD_ARBNUM</code> is indexed and the rest is decimal takes 3+ minutes.</p>
  
  <p>If run in DB2 the same query is run under 20 sec. (I do not know about indexing on the DB2 part)</p>
  
  <p>Any suggestions to speed up performance here?</p>