title: Performance of queries using count(*) on tables with many rows (300 million+)
body: <p>I understand there are limitations to using sqlite, but I'd like to know if it should be able to handle this scenario. </p>
  
  <p>My table has over 300 million records and the db is about 12 gigs. The data import util with sqlite is nice and fast. But then I added an index to a string column in this table, and it ran all night to complete this operation. I haven't compared this to other db's, but seemed quite slow to me. </p>
  
  <p>Now that my index is added, I'm wanting to look for duplicates in the data. So I'm trying to run a "having count > 0" query and it seems to be taking hours as well. My query looks like: </p>
  
  <pre><code>select col1, count(*) 
  from table1
  group by col1
  having count(*) &gt; 1
  </code></pre>
  
  <p>I would assume this query would use my index on col1, but the slow query execution makes me wonder if it is not? </p>
  
  <p>Would perhaps sql server handle this kind of thing better? </p>