title: SQLite: ON disk Vs Memory Database
body: <p>We are trying to Integrate SQLite in our Application and are trying to populate as a Cache. We are planning to use it as a In Memory Database. Using it for the first time. Our Application is C++ based.</p>
  
  <p>Our Application interacts with the Master Database to fetch data and performs numerous operations. These Operations are generally concerned with one Table which is quite huge in size.
  We replicated this Table in SQLite and following are the observations:</p>
  
  <p>Number of Fields: 60
  Number of Records: 1,00,000</p>
  
  <p>As the data population starts, the memory of the Application, shoots up drastically to ~1.4 GB from 120MB. At this time our application is in idle state and not doing any major operations. But normally, once the Operations start, the Memory Utilization shoots up. Now with SQLite as in Memory DB and this high memory usage, we don’t think we will be able to support these many records. </p>
  
  <p>When I create the DB on Disk, the DB size sums to ~40MB. But still the Memory Usage of the Application remains very high.</p>
  
  <p><em><strong>Q. Is there a reason for this high usage. All buffers have been cleared and as said before the DB is not in memory?</em></strong></p>
  
  <p>Any help would be deeply appreciated.</p>
  
  <p>Thanks and Regards
  Sachin</p>