title: What techniques are most effective for dealing with millions of records?
body: <p>I once had a MySQL database table containing 25 million records, which made even a simple <code>COUNT(*)</code> query takes minute to execute. I ended up making partitions, separating them into a couple tables. What i'm asking is, is there any pattern or design techniques to handle this kind of problem (huge number of records)? Is MSSQL or Oracle better in handling lots of records?</p>
  
  <p>P.S 
  the <code>COUNT(*)</code> problem stated above is just an example case, in reality the app does crud functionality and some aggregate query (for reporting), but nothing really complicated. It's just that it takes quite a while (minutes) to execute some these queries because of the table volume</p>